mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 07:38:49 -05:00
David Byron's fixes to make the latest curl build fine under MSVC 6.
This commit is contained in:
parent
b6a4ca9bc8
commit
4515d06465
10
CVS-INFO
10
CVS-INFO
@ -25,7 +25,8 @@ Compile and build instructions follow below.
|
||||
|
||||
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
|
||||
./configure
|
||||
@ -35,10 +36,15 @@ make
|
||||
|
||||
./configure --disable-shared --enable-debug --enable-maintainer-mode
|
||||
|
||||
In environments that don't support configure (i.e. Microsoft), do this:
|
||||
|
||||
buildconf.bat
|
||||
|
||||
|
||||
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 automake 1.7 (or later)
|
||||
|
@ -43,27 +43,27 @@ mingw32-ssl:
|
||||
|
||||
vc:
|
||||
cd lib
|
||||
nmake -f Makefile.vc6 cfg=release
|
||||
nmake /f Makefile.vc6 cfg=release
|
||||
cd ..\src
|
||||
nmake -f Makefile.vc6
|
||||
nmake /f Makefile.vc6
|
||||
|
||||
vc-ssl:
|
||||
cd lib
|
||||
nmake -f Makefile.vc6 cfg=release-ssl
|
||||
nmake /f Makefile.vc6 cfg=release-ssl
|
||||
cd ..\src
|
||||
nmake -f Makefile.vc6 cfg=release-ssl
|
||||
nmake /f Makefile.vc6 cfg=release-ssl
|
||||
|
||||
vc-ssl-dll:
|
||||
cd lib
|
||||
nmake -f Makefile.vc6 cfg=release-ssl-dll
|
||||
nmake /f Makefile.vc6 cfg=release-ssl-dll
|
||||
cd ..\src
|
||||
nmake -f Makefile.vc6
|
||||
nmake /f Makefile.vc6
|
||||
|
||||
vc-libcurl-ssl-dll:
|
||||
cd lib
|
||||
nmake -f Makefile.vc6 cfg=release-libcurl-ssl-dll
|
||||
nmake /f Makefile.vc6 cfg=release-libcurl-ssl-dll
|
||||
cd ..\src
|
||||
nmake -f Makefile.vc6
|
||||
nmake /f Makefile.vc6
|
||||
|
||||
djgpp:
|
||||
make -C lib -f Makefile.dj
|
||||
|
@ -52,7 +52,7 @@
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
|
||||
#include <winsock.h>
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
|
||||
#ifdef _AIX
|
||||
|
@ -43,10 +43,10 @@ OPENSSL_PATH = ../../openssl-0.9.7a
|
||||
CCNODBG = cl.exe /MD /O2 /D "NDEBUG"
|
||||
CCDEBUG = cl.exe /MDd /Od /Gm /Zi /D "_DEBUG" /GZ
|
||||
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
|
||||
LNKLIB = link.exe -lib
|
||||
LNKLIB = link.exe /lib
|
||||
LFLAGS = /nologo
|
||||
LINKLIBS = ws2_32.lib winmm.lib
|
||||
SSLLIBS = libeay32.lib ssleay32.lib
|
||||
@ -170,7 +170,7 @@ RESOURCE = $(DIROBJ)\libcurl.res
|
||||
# Usage
|
||||
#
|
||||
!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 release - release static library
|
||||
!MESSAGE release-dll - release dll
|
||||
|
@ -32,6 +32,10 @@
|
||||
#endif
|
||||
|
||||
/* 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 if you have the ANSI C header files. */
|
||||
|
@ -28,7 +28,7 @@ LINKD = link.exe /incremental:yes /debug /libpath:"../lib"
|
||||
ZLIB_PATH = ../../zlib-1.1.4
|
||||
!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
|
||||
LINKLIBS = ws2_32.lib libcurl.lib winmm.lib zlib.lib
|
||||
LINKLIBS_DEBUG = ws2_32.lib libcurld.lib winmm.lib zlib.lib
|
||||
@ -49,14 +49,6 @@ DEBUG_OBJS= \
|
||||
homedird.obj \
|
||||
maind.obj
|
||||
|
||||
LINK_OBJS= \
|
||||
hugehelp.obj \
|
||||
writeout.obj \
|
||||
urlglob.obj \
|
||||
getpass.obj \
|
||||
homedir.obj \
|
||||
main.obj
|
||||
|
||||
######################
|
||||
# release-ssl
|
||||
|
||||
@ -67,44 +59,45 @@ OPENSSL_PATH = ../../openssl-0.9.7a
|
||||
LFLAGSSSL = /LIBPATH:"$(OPENSSL_PATH)/out32"
|
||||
SSLLIBS = libeay32.lib ssleay32.lib gdi32.lib
|
||||
LINKLIBS = $(LINKLIBS) $(SSLLIBS)
|
||||
LINKLIBS_DEBUG = $(LINKLIBS_DEBUG) $(SSLLIBS)
|
||||
LFLAGS = $(LFLAGS) $(LFLAGSSSL)
|
||||
!ENDIF
|
||||
|
||||
all : release
|
||||
|
||||
release: $(RELEASE_OBJS)
|
||||
$(LINKR) $(LFLAGS) $(LINKLIBS) $(LINK_OBJS)
|
||||
$(LINKR) $(LFLAGS) $(LINKLIBS) $(RELEASE_OBJS)
|
||||
|
||||
debug: $(DEBUG_OBJS)
|
||||
$(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(LINK_OBJS)
|
||||
$(LINKD) $(LFLAGS) $(LINKLIBS_DEBUG) $(DEBUG_OBJS)
|
||||
|
||||
## Release
|
||||
hugehelpr.obj: hugehelp.c
|
||||
$(CCR) $(CFLAGS) /Zm200 hugehelp.c
|
||||
$(CCR) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
|
||||
writeoutr.obj: writeout.c
|
||||
$(CCR) $(CFLAGS) writeout.c
|
||||
$(CCR) $(CFLAGS) /Fo"$@" writeout.c
|
||||
urlglobr.obj: urlglob.c
|
||||
$(CCR) $(CFLAGS) urlglob.c
|
||||
$(CCR) $(CFLAGS) /Fo"$@" urlglob.c
|
||||
getpassr.obj: getpass.c
|
||||
$(CCR) $(CFLAGS) getpass.c
|
||||
$(CCR) $(CFLAGS) /Fo"$@" getpass.c
|
||||
homedirr.obj: homedir.c
|
||||
$(CCR) $(CFLAGS) homedir.c
|
||||
$(CCR) $(CFLAGS) /Fo"$@" homedir.c
|
||||
mainr.obj: main.c
|
||||
$(CCR) $(CFLAGS) main.c
|
||||
$(CCR) $(CFLAGS) /Fo"$@" main.c
|
||||
|
||||
## Debug
|
||||
hugehelpd.obj: hugehelp.c
|
||||
$(CCD) $(CFLAGS) /Zm200 hugehelp.c
|
||||
$(CCD) $(CFLAGS) /Zm200 /Fo"$@" hugehelp.c
|
||||
writeoutd.obj: writeout.c
|
||||
$(CCD) $(CFLAGS) writeout.c
|
||||
$(CCD) $(CFLAGS) /Fo"$@" writeout.c
|
||||
urlglobd.obj: urlglob.c
|
||||
$(CCD) $(CFLAGS) urlglob.c
|
||||
$(CCD) $(CFLAGS) /Fo"$@" urlglob.c
|
||||
getpassd.obj: getpass.c
|
||||
$(CCD) $(CFLAGS) getpass.c
|
||||
$(CCD) $(CFLAGS) /Fo"$@" getpass.c
|
||||
homedird.obj: homedir.c
|
||||
$(CCD) $(CFLAGS) homedir.c
|
||||
$(CCD) $(CFLAGS) /Fo"$@" homedir.c
|
||||
maind.obj: main.c
|
||||
$(CCD) $(CFLAGS) main.c
|
||||
$(CCD) $(CFLAGS) /Fo"$@" main.c
|
||||
|
||||
clean:
|
||||
-@erase homedir.obj
|
||||
|
@ -52,7 +52,7 @@
|
||||
#define CURLseparator "--_curl_--"
|
||||
|
||||
#if defined(WIN32)&&!defined(__CYGWIN32__)
|
||||
#include <winsock.h>
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
#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}.
|
||||
*/
|
||||
#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_MIN (curl_off_t)0x8000000000000000LL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* this is a duplicate of the function that is also used in libcurl */
|
||||
|
Loading…
Reference in New Issue
Block a user