Re: Segmentation fault in curl_easy_cleanup() [AIX]
Date: Sun, 20 Oct 2002 15:26:21 +0200 (MET DST)
On Sat, 19 Oct 2002 cml932atom_at_sulusea.org wrote:
> MEMDEBUG PROBLEM DETAIL 1/2:
> IBM's xlC compiler is incompatible with the empty -W as well as all
> other -W flags that "--debug-enabled" generates.
Right. I'll clear up that mess and only use -W and the others if gcc is used.
Otherwise only -g and -DMALLOCDEBUG shall be set. These have been left like
this because of my laziness, nothing else.
> When "--debug-enabled" is used, the environment var CFLAGS is not used.
> (This is probably not AIX/xlC specific, and if it is not intentional might
> be something that needs to be addressed.)
That's a true mistake. I'll fix this.
> After running configure with "--enable-debug" (see above), we customized
> the Makefiles by removing all "-W" options from CFLAGS and restoring our
> own CFLAGS. Note that "-DMALLOCDEBUG" as well as "-g" remain.
> The problem here apparently is that our (more restrictive?) pre-processor
> doesn't allow a DEFINE macro to redefine the standard function definition
> in "/usr/include/sys/socket.h". If it is as simple as this, then hopefully
> we can contact IBM AIX/xlC support for help in loosening this restriction.
> ---LOG 2/2 START---
> $ make
> Making all in lib
> cd .. && CONFIG_FILES= CONFIG_HEADERS=lib/ca-bundle.h /bin/sh ./config.status
> config.status: creating lib/ca-bundle.h
> config.status: lib/ca-bundle.h is unchanged
> make all-am
> source='file.c' object='file.lo' libtool=yes depfile='.deps/file.Plo' tmpdepfile='.deps/file.TPlo' depmode=aix /bin/sh ../depcomp /bin/sh ../libtool --mode=compile xlC_r -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DMALLOCDEBUG -O2 -qmaxmem=-1 -qarch=com -g -c -o file.lo `test -f file.c || echo './'`file.c
> xlC_r -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DMALLOCDEBUG -O2 -qmaxmem=-1 -qarch=com -g -c -M file.c
> "memdebug.h", line 67.9: 1506-213 (S) Macro name accept cannot be redefined.
> "memdebug.h", line 67.9: 1506-358 (I) "accept" is defined on line 127 of /usr/include/sys/socket.h.
> make: 1254-004 The error code from the last command is 1.
This seems to happen because accept() is already a macro, so we can't
redefine the define like this.
We could avoid the warning/error by using "#undef accept" first, but then I
bet we'll face some other problems.
What exactly is accept defined to on line 127 of /usr/include/sys/socket.h ?
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This sf.net email is sponsored by: Access Your PC Securely with GoToMyPC. Try Free Now https://www.gotomypc.com/s/OSND/DDReceived on 2002-10-20