curl-library
Windows patches
Date: Fri, 21 Nov 2003 17:05:49 +0100
The MSVC/MingW makefiles have fallen behind with the introduction of
src/homedir.c:
--- CVS-latest\src\Makefile.vc6 Tue Nov 04 07:59:25 2003
+++ src\Makefile.vc6 Wed Nov 12 18:01:23 2003
@@ -38,21 +38,24 @@
writeoutr.obj \
urlglobr.obj \
getpassr.obj \
- mainr.obj
+ mainr.obj \
+ homedirr.obj
DEBUG_OBJS= \
hugehelpd.obj \
writeoutd.obj \
urlglobd.obj \
getpassd.obj \
- maind.obj
+ maind.obj \
+ homedird.obj
LINK_OBJS= \
hugehelp.obj \
writeout.obj \
urlglob.obj \
getpass.obj \
- main.obj
+ main.obj \
+ homedir.obj
######################
# release-ssl
@@ -86,6 +89,8 @@
$(CCR) $(CFLAGS) getpass.c
mainr.obj: main.c
$(CCR) $(CFLAGS) main.c
+homedirr.obj: homedir.c
+ $(CCR) $(CFLAGS) homedir.c
## Debug
hugehelpd.obj: hugehelp.c
@@ -98,8 +103,11 @@
$(CCD) $(CFLAGS) getpass.c
maind.obj: main.c
$(CCD) $(CFLAGS) main.c
+homedird.obj: homedir.c
+ $(CCR) $(CFLAGS) homedir.c
clean:
+ -_at_erase homedir.obj
-_at_erase hugehelp.obj
-_at_erase main.obj
-_at_erase vc60.idb
------------
--- CVS-latest\src\Makefile.m32 Tue Oct 21 15:14:26 2003
+++ src\Makefile.m32 Fri Nov 21 17:02:17 2003
@@ -32,8 +32,8 @@
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
curl_PROGRAMS = curl.exe
-curl_OBJECTS = main.o hugehelp.o urlglob.o writeout.o getpass.o
-curl_SOURCES = main.c hugehelp.c urlglob.c writeout.c getpass.c
+curl_OBJECTS = main.o hugehelp.o urlglob.o writeout.o getpass.o homedir.o
+curl_SOURCES = main.c hugehelp.c urlglob.c writeout.c getpass.c homedir.c
ifdef DYN
curl_DEPENDENCIES = ../lib/libcurldll.a ../lib/libcurl.dll
curl_LDADD = -L../lib -lcurldll
-------------
The netrc.c files doesn't compile unless we have 'struct passwd':
--- CVS-latest\lib\netrc.c Tue Nov 11 15:30:45 2003
+++ lib\netrc.c Wed Nov 12 17:55:28 2003
@@ -92,6 +92,8 @@
char state_password=0; /* Found a password keyword */
char state_our_login=0; /* With specific_login, found *our* login name */
+#define NETRC DOT_CHAR "netrc"
+
#ifdef CURLDEBUG
{
/* This is a hack to allow testing.
@@ -101,7 +103,7 @@
char *override = curl_getenv("CURL_DEBUG_NETRC");
if (override) {
- printf("NETRC: overridden .netrc file: %s\n", home);
+ printf("NETRC: overridden " NETRC " file: %s\n", home);
netrcfile = override;
netrc_alloc = TRUE;
}
@@ -107,8 +109,8 @@
}
}
#endif /* CURLDEBUG */
+
if(!netrcfile) {
-#define NETRC DOT_CHAR "netrc"
#if defined(HAVE_GETPWUID) && defined(HAVE_GETEUID)
struct passwd *pw;
pw= getpwuid(geteuid());
@@ -119,6 +121,8 @@
home = pw->pw_dir;
#endif
}
+#else
+ void *pw = NULL;
#endif
if(NULL == pw) {
----------------
I have some more beafs with libcurl. I suggest memdebug.c always be compiled
(i.e. remove the #ifdef at top and add the functions to the .def file). So one don't
need to rebuild the lib/dll/import-lib when switching CURLDEBUG on/off.
Only probem I can see is the 'VOID_VAR_MEMDEBUG' for VMS. What's it
for?
--- CVS-latest\lib\memdebug.c Thu Nov 13 08:33:51 2003
+++ lib\memdebug.c Fri Nov 21 16:58:22 2003
@@ -1,4 +1,3 @@
-#ifdef CURLDEBUG
/***************************************************************************
* _ _ ____ _
* Project ___| | | | _ \| |
@@ -22,6 +21,9 @@
* $Id: memdebug.c,v 1.32 2003/11/13 07:33:51 bagder Exp $
***************************************************************************/
+#undef CURLDEBUG
+#define CURLDEBUG
+
#include "setup.h"
#include <curl/curl.h>
@@ -256,8 +258,3 @@
source, line, file);
return res;
}
-#else
-#ifdef VMS
-int VOID_VAR_MEMDEBUG;
-#endif
-#endif /* CURLDEBUG */
--- CVS-latest\lib\libcurl.def Thu Sep 04 11:04:15 2003
+++ lib\libcurl.def Fri Nov 21 16:53:34 2003
@@ -2,7 +2,7 @@
; Definition file for the DLL version of the LIBCURL library from curl
;
-LIBRARY LIBCURL
+LIBRARY libcurl.dll
DESCRIPTION 'curl libcurl - http://curl.haxx.se'
@@ -45,3 +45,23 @@
curl_share_init @ 36;
curl_share_setopt @ 37;
curl_share_cleanup @ 38;
+ curl_mvprintf @ 39 ;
+ curl_mvsprintf @ 40 ;
+ curl_mvsnprintf @ 41 ;
+ curl_mvaprintf @ 42 ;
+
+ ;
+ ; memdebug.c
+ ;
+ curl_dofree @ 43 ;
+ curl_domalloc @ 44 ;
+ curl_dorealloc @ 45 ;
+ curl_fopen @ 46 ;
+ curl_fclose @ 47 ;
+ curl_fopen @ 48 ;
+ curl_dostrdup @ 49 ;
+ curl_memlimit @ 50 ;
+ curl_memdebug @ 51 ;
+ curl_socket @ 52 ;
+ curl_accept @ 53 ;
+ curl_sclose @ 54 ;
------------
Gisle V.
# rm /bin/laden
/bin/laden: Not found
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
Received on 2003-11-21