aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-02-26 16:23:28 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-02-26 16:23:28 +0000
commit4515d06465da15340c56d5b4f14ab4950fd59baa (patch)
treeede4a04b2ee9145fa76a0b55f813570190065fea /src
parentb6a4ca9bc82c4dbf4f3abaa6ff63bb832fa1bd03 (diff)
David Byron's fixes to make the latest curl build fine under MSVC 6.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.vc639
-rw-r--r--src/main.c7
2 files changed, 22 insertions, 24 deletions
diff --git a/src/Makefile.vc6 b/src/Makefile.vc6
index d8b65f066..392df671d 100644
--- a/src/Makefile.vc6
+++ b/src/Makefile.vc6
@@ -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
diff --git a/src/main.c b/src/main.c
index ded76944c..bda7f2b19 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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,9 +1017,14 @@ 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 */
*val = strtoofft(str, NULL, 0);