1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

David Byron's fixes to make the latest curl build fine under MSVC 6.

This commit is contained in:
Daniel Stenberg 2004-02-26 16:23:28 +00:00
parent b6a4ca9bc8
commit 4515d06465
7 changed files with 46 additions and 38 deletions

View File

@ -25,7 +25,8 @@ Compile and build instructions follow below.
perl/ is a subdirectory with various perl scripts perl/ is a subdirectory with various perl scripts
To build after having extracted everything from CVS, do this: To build in environments that support configure, after having extracted
everything from CVS, do this:
./buildconf ./buildconf
./configure ./configure
@ -35,10 +36,15 @@ make
./configure --disable-shared --enable-debug --enable-maintainer-mode ./configure --disable-shared --enable-debug --enable-maintainer-mode
In environments that don't support configure (i.e. Microsoft), do this:
buildconf.bat
REQUIREMENTS REQUIREMENTS
You need the following software installed: For buildconf (not buildconf.bat) to work, you need the following software
installed:
o autoconf 2.57 (or later) o autoconf 2.57 (or later)
o automake 1.7 (or later) o automake 1.7 (or later)

View File

@ -43,27 +43,27 @@ mingw32-ssl:
vc: vc:
cd lib cd lib
nmake -f Makefile.vc6 cfg=release nmake /f Makefile.vc6 cfg=release
cd ..\src cd ..\src
nmake -f Makefile.vc6 nmake /f Makefile.vc6
vc-ssl: vc-ssl:
cd lib cd lib
nmake -f Makefile.vc6 cfg=release-ssl nmake /f Makefile.vc6 cfg=release-ssl
cd ..\src cd ..\src
nmake -f Makefile.vc6 cfg=release-ssl nmake /f Makefile.vc6 cfg=release-ssl
vc-ssl-dll: vc-ssl-dll:
cd lib cd lib
nmake -f Makefile.vc6 cfg=release-ssl-dll nmake /f Makefile.vc6 cfg=release-ssl-dll
cd ..\src cd ..\src
nmake -f Makefile.vc6 nmake /f Makefile.vc6
vc-libcurl-ssl-dll: vc-libcurl-ssl-dll:
cd lib cd lib
nmake -f Makefile.vc6 cfg=release-libcurl-ssl-dll nmake /f Makefile.vc6 cfg=release-libcurl-ssl-dll
cd ..\src cd ..\src
nmake -f Makefile.vc6 nmake /f Makefile.vc6
djgpp: djgpp:
make -C lib -f Makefile.dj make -C lib -f Makefile.dj

View File

@ -52,7 +52,7 @@
#endif #endif
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
#include <winsock.h> #include <winsock2.h>
#else #else
#ifdef _AIX #ifdef _AIX

View File

@ -43,10 +43,10 @@ OPENSSL_PATH = ../../openssl-0.9.7a
CCNODBG = cl.exe /MD /O2 /D "NDEBUG" CCNODBG = cl.exe /MD /O2 /D "NDEBUG"
CCDEBUG = cl.exe /MDd /Od /Gm /Zi /D "_DEBUG" /GZ CCDEBUG = cl.exe /MDd /Od /Gm /Zi /D "_DEBUG" /GZ
CFLAGSSSL = /D "USE_SSLEAY" /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl" CFLAGSSSL = /D "USE_SSLEAY" /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
CFLAGS = /I "../include" /nologo /W3 /GX /D "WIN32" /D "VC6" /D "_MBCS" /D "_LIB" /YX /FD /c /D "MSDOS" CFLAGS = /I "." /I "../include" /nologo /W3 /GX /D "WIN32" /D "VC6" /D "_MBCS" /D "_LIB" /YX /FD /c /D "MSDOS"
LNKDLL = link.exe /DLL /def:libcurl.def LNKDLL = link.exe /DLL /def:libcurl.def
LNKLIB = link.exe -lib LNKLIB = link.exe /lib
LFLAGS = /nologo LFLAGS = /nologo
LINKLIBS = ws2_32.lib winmm.lib LINKLIBS = ws2_32.lib winmm.lib
SSLLIBS = libeay32.lib ssleay32.lib SSLLIBS = libeay32.lib ssleay32.lib
@ -170,7 +170,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
# Usage # Usage
# #
!IF "$(CFGSET)" == "FALSE" !IF "$(CFGSET)" == "FALSE"
!MESSAGE Usage: nmake -f makefile.vc6 CFG=<config> <target> !MESSAGE Usage: nmake /f makefile.vc6 CFG=<config> <target>
!MESSAGE where <config> is one of: !MESSAGE where <config> is one of:
!MESSAGE release - release static library !MESSAGE release - release static library
!MESSAGE release-dll - release dll !MESSAGE release-dll - release dll

View File

@ -32,6 +32,10 @@
#endif #endif
/* The size of a `curl_off_t', as computed by sizeof. */ /* The size of a `curl_off_t', as computed by sizeof. */
#ifdef SIZEOF_CURL_OFF_T
#undef SIZEOF_CURL_OFF_T
#endif
#define SIZEOF_CURL_OFF_T 8 #define SIZEOF_CURL_OFF_T 8
/* Define if you have the ANSI C header files. */ /* Define if you have the ANSI C header files. */

View File

@ -28,7 +28,7 @@ LINKD = link.exe /incremental:yes /debug /libpath:"../lib"
ZLIB_PATH = ../../zlib-1.1.4 ZLIB_PATH = ../../zlib-1.1.4
!ENDIF !ENDIF
CFLAGS = /I "../include" /I "$(ZLIB_PATH)" /nologo /W3 /GX /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c CFLAGS = /I "../lib" /I "../include" /I "$(ZLIB_PATH)" /nologo /W3 /GX /D "WIN32" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
LFLAGS = /nologo /libpath:"$(ZLIB_PATH)" /out:$(PROGRAM_NAME) /subsystem:console /machine:I386 LFLAGS = /nologo /libpath:"$(ZLIB_PATH)" /out:$(PROGRAM_NAME) /subsystem:console /machine:I386
LINKLIBS = ws2_32.lib libcurl.lib winmm.lib zlib.lib LINKLIBS = ws2_32.lib libcurl.lib winmm.lib zlib.lib
LINKLIBS_DEBUG = ws2_32.lib libcurld.lib winmm.lib zlib.lib LINKLIBS_DEBUG = ws2_32.lib libcurld.lib winmm.lib zlib.lib
@ -49,14 +49,6 @@ DEBUG_OBJS= \
homedird.obj \ homedird.obj \
maind.obj maind.obj
LINK_OBJS= \
hugehelp.obj \
writeout.obj \
urlglob.obj \
getpass.obj \
homedir.obj \
main.obj
###################### ######################
# release-ssl # release-ssl
@ -67,44 +59,45 @@ OPENSSL_PATH = ../../openssl-0.9.7a
LFLAGSSSL = /LIBPATH:"$(OPENSSL_PATH)/out32" LFLAGSSSL = /LIBPATH:"$(OPENSSL_PATH)/out32"
SSLLIBS = libeay32.lib ssleay32.lib gdi32.lib SSLLIBS = libeay32.lib ssleay32.lib gdi32.lib
LINKLIBS = $(LINKLIBS) $(SSLLIBS) LINKLIBS = $(LINKLIBS) $(SSLLIBS)
LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) $(SSLLIBS)
LFLAGS = $(LFLAGS) $(LFLAGSSSL) LFLAGS = $(LFLAGS) $(LFLAGSSSL)
!ENDIF !ENDIF
all : release all : release
release: $(RELEASE_OBJS) release: $(RELEASE_OBJS)
$(LINKR) $(LFLAGS) $(LINKLIBS) $(LINK_OBJS) $(LINKR) $(LFLAGS) $(LINKLIBS) $(RELEASE_OBJS)
debug: $(DEBUG_OBJS) debug: $(DEBUG_OBJS)
$(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(LINK_OBJS) $(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(DEBUG_OBJS)
## Release ## Release
hugehelpr.obj: hugehelp.c hugehelpr.obj: hugehelp.c
$(CCR) $(CFLAGS) /Zm200 hugehelp.c $(CCR) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
writeoutr.obj: writeout.c writeoutr.obj: writeout.c
$(CCR) $(CFLAGS) writeout.c $(CCR) $(CFLAGS) /Fo"$@" writeout.c
urlglobr.obj: urlglob.c urlglobr.obj: urlglob.c
$(CCR) $(CFLAGS) urlglob.c $(CCR) $(CFLAGS) /Fo"$@" urlglob.c
getpassr.obj: getpass.c getpassr.obj: getpass.c
$(CCR) $(CFLAGS) getpass.c $(CCR) $(CFLAGS) /Fo"$@" getpass.c
homedirr.obj: homedir.c homedirr.obj: homedir.c
$(CCR) $(CFLAGS) homedir.c $(CCR) $(CFLAGS) /Fo"$@" homedir.c
mainr.obj: main.c mainr.obj: main.c
$(CCR) $(CFLAGS) main.c $(CCR) $(CFLAGS) /Fo"$@" main.c
## Debug ## Debug
hugehelpd.obj: hugehelp.c hugehelpd.obj: hugehelp.c
$(CCD) $(CFLAGS) /Zm200 hugehelp.c $(CCD) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
writeoutd.obj: writeout.c writeoutd.obj: writeout.c
$(CCD) $(CFLAGS) writeout.c $(CCD) $(CFLAGS) /Fo"$@" writeout.c
urlglobd.obj: urlglob.c urlglobd.obj: urlglob.c
$(CCD) $(CFLAGS) urlglob.c $(CCD) $(CFLAGS) /Fo"$@" urlglob.c
getpassd.obj: getpass.c getpassd.obj: getpass.c
$(CCD) $(CFLAGS) getpass.c $(CCD) $(CFLAGS) /Fo"$@" getpass.c
homedird.obj: homedir.c homedird.obj: homedir.c
$(CCD) $(CFLAGS) homedir.c $(CCD) $(CFLAGS) /Fo"$@" homedir.c
maind.obj: main.c maind.obj: main.c
$(CCD) $(CFLAGS) main.c $(CCD) $(CFLAGS) /Fo"$@" main.c
clean: clean:
-@erase homedir.obj -@erase homedir.obj

View File

@ -52,7 +52,7 @@
#define CURLseparator "--_curl_--" #define CURLseparator "--_curl_--"
#if defined(WIN32)&&!defined(__CYGWIN32__) #if defined(WIN32)&&!defined(__CYGWIN32__)
#include <winsock.h> #include <winsock2.h>
#endif #endif
#ifdef TIME_WITH_SYS_TIME #ifdef TIME_WITH_SYS_TIME
@ -1017,8 +1017,13 @@ static int str2offset(curl_off_t *val, char *str)
* definitions for LLONG_{MIN,MAX} or LONG_LONG_{MIN,MAX}. * definitions for LLONG_{MIN,MAX} or LONG_LONG_{MIN,MAX}.
*/ */
#ifndef LLONG_MAX #ifndef LLONG_MAX
#ifdef _MSC_VER
#define LLONG_MAX (curl_off_t)0x7FFFFFFFFFFFFFFFi64
#define LLONG_MIN (curl_off_t)0x8000000000000000i64
#else
#define LLONG_MAX (curl_off_t)0x7FFFFFFFFFFFFFFFLL #define LLONG_MAX (curl_off_t)0x7FFFFFFFFFFFFFFFLL
#define LLONG_MIN (curl_off_t)0x8000000000000000LL #define LLONG_MIN (curl_off_t)0x8000000000000000LL
#endif
#endif #endif
/* this is a duplicate of the function that is also used in libcurl */ /* this is a duplicate of the function that is also used in libcurl */