Commit 377e43fb authored by Gisle Vanem's avatar Gisle Vanem
Browse files

Changes for removing libcurl.def file on Win32.
Added "CURL_EXTERN" to memdebug.h functions.
Cleaned up Makefile.vc6.
parent 1f2b042b
Loading
Loading
Loading
Loading
+8 −9
Original line number Diff line number Diff line
@@ -24,13 +24,12 @@ AUTOMAKE_OPTIONS = foreign nostdinc

DSP = curllib.dsp

EXTRA_DIST = Makefile.b32 Makefile.m32					\
  Makefile.vc6 Makefile.riscos libcurl.def $(DSP) curllib.dsw		\
  config-vms.h config-win32.h config-riscos.h config-mac.h config.h.in	\
  ca-bundle.crt README.encoding README.memoryleak README.ares		\
  README.curlx makefile.dj config.dj libcurl.framework.make		\
  libcurl.plist libcurl.rc config-amigaos.h amigaos.c amigaos.h		\
  makefile.amiga Makefile.netware nwlib.c libcurl.imp			\
EXTRA_DIST = Makefile.b32 Makefile.m32 Makefile.vc6 Makefile.riscos $(DSP) \
  curllib.dsw config-vms.h config-win32.h config-win32ce.h config-riscos.h \
  config-mac.h config.h.in ca-bundle.crt README.encoding                   \
  README.memoryleak README.ares README.curlx makefile.dj config.dj         \
  libcurl.framework.make libcurl.plist libcurl.rc config-amigaos.h         \
  amigaos.c amigaos.h makefile.amiga Makefile.netware nwlib.c libcurl.imp  \
  msvcproj.head msvcproj.foot config-win32ce.h

CLEANFILES = $(DSP)
@@ -90,7 +89,7 @@ include Makefile.inc

libcurl_la_SOURCES = $(CSOURCES) $(HHEADERS)

WIN32SOURCES = $(CSOURCES) libcurl.def
WIN32SOURCES = $(CSOURCES)
WIN32HEADERS = $(HHEADERS) config-win32.h

BUILT_SOURCES = $(top_builddir)/lib/ca-bundle.h
+7 −13
Original line number Diff line number Diff line
@@ -25,8 +25,8 @@ STRIP = strip -g
########################################################
## Nothing more to do below this line!

INCLUDES = -I. -I.. -I../include -I../src
CFLAGS = -g -O2 -DMINGW32
INCLUDES = -I. -I../include
CFLAGS = -g -O2 -DMINGW32 -DBUILDING_LIBCURL
ifdef SSL
  INCLUDES += -I"$(OPENSSL_PATH)/outinc" -I"$(OPENSSL_PATH)/outinc/openssl"
  CFLAGS += -DUSE_SSLEAY -DHAVE_OPENSSL_ENGINE_H
@@ -59,22 +59,16 @@ RESOURCE = libcurl.res

# remove the last line above to keep debug info

libcurl.dll libcurldll.a: libcurl.a libcurl.def $(RESOURCE)
libcurl.dll libcurldll.a: $(libcurl_a_OBJECTS) $(RESOURCE)
	$(RM) $@
	dllwrap --dllname $@ --output-lib libcurldll.a --export-all --def libcurl.def $(libcurl_a_LIBRARIES) $(RESOURCE) $(DLL_LIBS) -lwsock32 -lws2_32 -lwinmm
	$(STRIP) $@
	$(CC) -s -shared -Wl,--out-implib,libcurldll.a -o libcurl.dll \
	  $(libcurl_a_OBJECTS) $(RESOURCE) $(DLL_LIBS) -lws2_32 -lwinmm

# remove the last line above to keep debug info
# remove the above '-s' to keep debug info

.c.o:
	$(COMPILE) -c $<

.s.o:
	$(COMPILE) -c $<

.S.o:
	$(COMPILE) -c $<

libcurl.res: libcurl.rc
	windres -DCURLDEBUG=0 -O COFF -o $@ -i $^

+3 −3
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ CP = cp -afv
MPKXDC	= mkxdc

# Global flags for all compilers
CFLAGS	= $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -nostdinc
CFLAGS	= $(OPT) -D$(DB) -DNETWARE -DHAVE_CONFIG_H -DBUILDING_LIBCURL -nostdinc

ifeq ($(CC),mwccnlm)
LD	= mwldnlm
+11 −10
Original line number Diff line number Diff line
@@ -39,12 +39,12 @@ USEMM_LIBS = YES
#############################################################
## Nothing more to do below this line!

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"
CFLAGSZLIB = /D "HAVE_ZLIB_H" /D "HAVE_ZLIB" /D "HAVE_LIBZ" /I "$(ZLIB_PATH)"
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
CCNODBG    = cl.exe /MD /O2 /DNDEBUG
CCDEBUG    = cl.exe /MDd /Od /Gm /Zi /D_DEBUG /GZ
CFLAGSSSL  = /DUSE_SSLEAY /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl"
CFLAGSZLIB = /DHAVE_ZLIB_H /DHAVE_ZLIB /DHAVE_LIBZ /I "$(ZLIB_PATH)"
CFLAGS     = /I. /I../include /nologo /W3 /GX /DWIN32 /DVC6 /D_MBCS /D_LIB /YX /FD /c /DBUILDING_LIBCURL
LNKDLL     = link.exe /DLL
LNKLIB     = link.exe /lib
LFLAGS     = /nologo
SSLLIBS    = libeay32.lib ssleay32.lib
@@ -52,7 +52,7 @@ SSLLIBS = libeay32.lib ssleay32.lib
WINLIBS    = wsock32.lib winmm.lib
!ELSE
WINLIBS    = wsock32.lib
CFLAGS     = $(CFLAGS) /D "WITHOUT_MM_LIB"
CFLAGS     = $(CFLAGS) /DWITHOUT_MM_LIB
!ENDIF
#  RSAglue.lib was formerly needed in the SSLLIBS
CFGSET     = FALSE
@@ -272,6 +272,7 @@ X_OBJS= \
        $(DIROBJ)\http_negotiate.obj \
        $(DIROBJ)\http_ntlm.obj \
	$(DIROBJ)\md5.obj \
	$(DIROBJ)\memdebug.obj \
	$(DIROBJ)\strerror.obj \
	$(DIROBJ)\content_encoding.obj \
	$(RESOURCE)
+21 −19
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@

#include "setup.h"

#include <curl/curl.h>

#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -48,24 +50,24 @@
extern FILE *logfile;

/* memory functions */
void *curl_domalloc(size_t size, int line, const char *source);
void *curl_docalloc(size_t elements, size_t size, int line, const char *source);
void *curl_dorealloc(void *ptr, size_t size, int line, const char *source);
void curl_dofree(void *ptr, int line, const char *source);
char *curl_dostrdup(const char *str, int line, const char *source);
void curl_memdebug(const char *logname);
void curl_memlimit(long limit);
CURL_EXTERN void *curl_domalloc(size_t size, int line, const char *source);
CURL_EXTERN void *curl_docalloc(size_t elements, size_t size, int line, const char *source);
CURL_EXTERN void *curl_dorealloc(void *ptr, size_t size, int line, const char *source);
CURL_EXTERN void curl_dofree(void *ptr, int line, const char *source);
CURL_EXTERN char *curl_dostrdup(const char *str, int line, const char *source);
CURL_EXTERN void curl_memdebug(const char *logname);
CURL_EXTERN void curl_memlimit(long limit);

/* file descriptor manipulators */
int curl_socket(int domain, int type, int protocol, int line , const char *);
int curl_sclose(int sockfd, int, const char *source);
int curl_accept(int s, void *addr, void *addrlen,
CURL_EXTERN int curl_socket(int domain, int type, int protocol, int line , const char *);
CURL_EXTERN int curl_sclose(int sockfd, int, const char *source);
CURL_EXTERN int curl_accept(int s, void *addr, void *addrlen,
                            int line, const char *source);

/* FILE functions */
FILE *curl_fopen(const char *file, const char *mode, int line,
CURL_EXTERN FILE *curl_fopen(const char *file, const char *mode, int line,
                             const char *source);
int curl_fclose(FILE *file, int line, const char *source);
CURL_EXTERN int curl_fclose(FILE *file, int line, const char *source);

#ifndef MEMDEBUG_NODEFINES

Loading