cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Newbie Proglem with Compile

From: <Medsyntel_at_aol.com>
Date: Tue, 4 Jan 2011 23:53:01 -0500 (EST)

Gun:
 
    Your solution is difficult for me ( as C 'oblivious' user), but I'll
try to digest your solution tomorrow.
 
    I use the xHarbour language -- with which I'm an intense daily
application builder. It just happens that my very high-level xHarbour language
itself compiles into C, and so on down to the executable.
 
    Maybe I can get some fiends and my ng (comp.lang.xharbour) to help me
digest your solution. Or, maybe I'm in a bigger hole than I realize ... :(
 
Thank you for the speedy response.
 
-Mel Smith
 
 

yes, but it seems that Borland doesnt understand the CURL_OFF_T_C*
macros defined in ./include/curl/curlrules.h ...
for now until we found something better I think you can just go with:
--- include\curl\curlrules.h.orig Wed Mar 31 20:40:39 2010
+++ include\curl\curlrules.h Wed Jan 05 04:43:55 2011
@@ -222,8 +222,12 @@
# define __CURL_OFF_T_C_HELPER2(Val,Suffix) Val/**/Suffix
#endif
#define __CURL_OFF_T_C_HELPER1(Val,Suffix)
__CURL_OFF_T_C_HELPER2(Val,Suffix)
+/*
#define CURL_OFF_T_C(Val)
__CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_T)
#define CURL_OFF_TU_C(Val)
__CURL_OFF_T_C_HELPER1(Val,CURL_SUFFIX_CURL_OFF_TU)
+*/
+#define CURL_OFF_T_C(Val) Val
+#define CURL_OFF_TU_C(Val) Val

/*
* Get rid of macros private to this header file.

this passes the process.c break ...
but then next you will face a break with sockaddr.h; for this you need
to fix ./lib/config-win32.h:
--- lib\config-win32.h.orig Fri Dec 03 04:00:10 2010
+++ lib\config-win32.h Wed Jan 05 04:48:07 2011
@@ -357,7 +357,7 @@
/* ---------------------------------------------------------------- */

/* Define this if you have struct sockaddr_storage */
-#ifndef __SALFORDC__
+#if !(defined(__SALFORDC__) || defined(__BORLANDC__))
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
#endif

I will commit this change asap so it appears in next snapshot.

Next break is in ldap.c, and I dont have the mood currently to check if
the Borland headers are sufficient for our LDAP support - though I guess
not; and anyway you speak of a CGI so unlikely you will need LDAP there,
or? So just disable it in Makefile.b32:
--- lib\Makefile.b32.orig Wed Mar 31 20:40:39 2010
+++ lib\Makefile.b32 Wed Jan 05 04:53:14 2011
@@ -44,6 +44,8 @@
# If you build with SSL support, set WITH_SSL=1
DEFINES = -DNDEBUG -DWIN32 -D_CONSOLE -D_MBCS -DBUILDING_LIBCURL

+DEFINES = $(DEFINES) -DCURL_DISABLE_LDAP
+
!ifdef WITH_ZLIB
DEFINES = $(DEFINES) -DHAVE_LIBZ -DHAVE_ZLIB_H
INCDIRS = $(INCDIRS);$(ZLIB_PATH)

if time permits I will check if we need to disable LDAP completely, or
if we should make it configurable there in Makefile.b32 ...

with these changes I got a working curl.exe:
curl 7.21.4-20110105 (i386-pc-win32) libcurl/7.21.4-20110105
Protocols: dict file ftp gopher http imap pop3 rtsp smtp telnet tftp
Features: AsynchDNS

so I assume that the lib is fine too ...

@Yang: hope you read that here, and can take a look at the macros in
curlrules.h and probably have an idea what we can do here ...

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-01-05