1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
Commit Graph

59 Commits

Author SHA1 Message Date
Yang Tse
b8dde1cf19 setup_once.h: HP-UX specific 'bool', 'false' and 'true' definitions.
Also reverts commit f254c59dc7
2012-12-17 02:07:10 +01:00
Yang Tse
0e8e340cba setup_once.h: HP-UX <sys/socket.h> issue workaround
Issue: When building a 32bit target with large file support HP-UX
<sys/socket.h> header file may simultaneously provide two different
sets of declarations for sendfile and sendpath functions, one with
static and another with external linkage. Given that we do not use
mentioned functions we really don't care which linkage is the
appropriate one, but on the other hand, the double declaration emmits
warnings when using the HP-UX compiler and errors when using modern
gcc versions resulting in fatal compilation errors.

Mentioned issue is now fixed as long as we don't use sendfile nor
sendpath functions.
2012-12-14 19:39:22 +01:00
Yang Tse
a0b207164c setup_once.h: refactor inclusion of <unistd.h> and <sys/socket.h>
Inclusion of top two most included header files now done in setup_once.h
2012-12-14 17:38:18 +01:00
Yang Tse
f254c59dc7 setup_once.h: HP-UX specific TRUE and FALSE definitions
Some HP-UX system headers require TRUE defined to 1 and FALSE to 0.
2012-12-12 16:14:24 +01:00
Yang Tse
7d4ed0b10e setup_once.h: tighten requirements for stdbool.h header inclusion
Include stdbool.h only when it is available and configure is capable of
detecting a proper 'bool' data type when the header is included.

Compilation fix for old or unpatched versions of XL C compiler.

Report: http://curl.haxx.se/mail/archive-2012-04/0022.html
2012-04-14 15:41:38 +02:00
Daniel Stenberg
ad77420ac7 lwip: basic checks and macros for compatiblity 2012-03-17 23:02:21 +01:00
Yang Tse
196e0d699f setup_once.h cleanup and sync 2011-09-04 17:10:51 +02:00
Yang Tse
a405a8976d revert changes not intended to be pushed with commit 6b75d2c2 2011-09-03 18:26:21 +02:00
Yang Tse
6b75d2c2df fix a bunch of MSVC compiler warnings 2011-09-03 16:07:09 +02:00
Yang Tse
9194e17003 MemoryTracking: fix logging of free() calls done where Curl_safefree is called
Just internal stuff...

Curl_safefree is now a macro defined in memdebug.h instead of a function
prototyped in url.h and implemented in url.c, so inclusion of url.h is no
longer required in order to simply use Curl_safefree.

Provide definition of macro WHILE_FALSE in setup_once.h in order to allow
other macros such as DEBUGF and DEBUGASSERT, and code using it, to compile
without 'conditional expression is constant' warnings.

The WHILE_FALSE stuff fixes 150+ MSVC compiler warnings.
2011-09-02 19:40:53 +02:00
Yang Tse
f6272dd9b8 BSD-style lwIP TCP/IP stack support - followup 2011-08-05 15:53:00 +02:00
Yang Tse
ef2176109f errno.h inclusion conditionally done in setup_once.h 2011-07-24 04:39:43 +02:00
Daniel Stenberg
b5d170b551 CLOSESOCKETFUNCTION: added
Introduced the initial setup to allow closesocket callbacks by making
sure sclose() is only ever called from one place in the libcurl source
and still run all test cases fine.
2011-05-18 22:56:46 +02:00
Daniel Stenberg
f19ace8d33 gmtime: remove define
It turns out some systems rely on the gmtime or gmtime_r to be defined
already in the system headers and thus my "precaution" redefining of
them only caused trouble. They are now removed.
2011-02-14 13:42:01 +01:00
Daniel Stenberg
0696260122 Curl_gmtime: avoid future mistakes
Document Curl_gmtime() and define away the old functions so that they
won't be used internally again by mistake.
2011-02-07 15:09:24 +01:00
Yang Tse
374f48675b update year in copyright notice 2010-05-31 13:51:29 +02:00
Tor Arntsen
b4f0e1291f setup_once: use enum type for 'bool' on non-C99 platforms
An enum will catch non-bool assignments to bool on platforms with
a strict compiler, e.g MIPSPro.

Signed-off-by: Kamil Dudka <kdudka@redhat.com>
2010-05-27 18:15:17 +02:00
Tanguy Fautre
81239edb89 build: allow curl to build with Microsoft VC10
By undefing a bunch of E* defines that VC10 has started to define
but that we redefine internally to their WSA* alternatives when
building for Windows.
2010-05-20 22:40:48 +02:00
Daniel Stenberg
2309b4e330 remove the CVSish $Id$ lines 2010-03-24 11:02:54 +01:00
Yang Tse
3184a91ec8 VMS specific preprocessor symbol checking adjustments 2009-12-30 17:59:56 +00:00
Yang Tse
2c0c05e96d sclose() function-like macro definition used to close a socket,
now solely based on HAVE_CLOSESOCKET and HAVE_CLOSESOCKET_CAMEL
config file preprocessor definitions.
2009-06-19 00:41:03 +00:00
Yang Tse
2c16681225 Adjusted to take in account that...
With the curl memory tracking feature decoupled from the debug build feature,
CURLDEBUG and DEBUGBUILD preprocessor symbol definitions are used as follows:

CURLDEBUG used for curl debug memory tracking specific code (--enable-curldebug)

DEBUGBUILD used for debug enabled specific code (--enable-debug)
2009-06-10 02:49:42 +00:00
Yang Tse
9137e717b0 Use build-time configured curl_socklen_t instead of socklen_t 2009-05-02 02:37:32 +00:00
Yang Tse
9770899a4b Moved potential inclusion of system's malloc.h and memory.h header files to
setup_once.h.  Inclusion of each header file is based on the definition of
NEED_MALLOC_H and NEED_MEMORY_H respectively.
2009-04-21 10:26:58 +00:00
Yang Tse
f9894f4ebc Don't abort configuration if recvfrom() is not available. 2008-08-27 00:25:02 +00:00
Yang Tse
0919de4511 Change recvfrom's sixth argument data type to the 'historically standard' 'int'
data type for systems where this sixth argument is prototyped as a void pointer.

Start of thread: http://curl.haxx.se/mail/lib-2008-07/0153.html
2008-07-21 18:24:32 +00:00
Yang Tse
1b37baf656 Use the sreadfrom() wrapper to replace recvfrom() in our code. 2008-07-21 03:06:07 +00:00
Yang Tse
39f23aec6b RECVFROM_TYPE_ARG2, RECVFROM_TYPE_ARG5 and RECVFROM_TYPE_ARG6 are now defined
to the data type pointed by its respective argument and not the pointer type.
2008-07-17 03:07:54 +00:00
Yang Tse
a9dc900515 Configure process now checks availability of recvfrom() socket function and
finds out its return type and the types of its arguments. Added definitions
for non-configure systems config files, and introduced macro sreadfrom which
will be used on udp sockets as a recvfrom() wrapper.
2008-07-16 19:16:41 +00:00
Yang Tse
d8efc99217 fix: remove need and definition of HAVE_SOCKLEN_T symbol 2008-05-21 14:04:14 +00:00
Yang Tse
08c5e2a194 Windows build targets have socklen_t definition in ws2tcpip.h but some
versions of ws2tcpip.h do not have the definition. It seems that when
the socklen_t definition is missing from ws2tcpip.h the definition for
INET_ADDRSTRLEN is also missing, and that when one definition is present
the other one also is available.
2007-10-24 14:39:07 +00:00
Yang Tse
92433e596b We use this ZERO_NULL to avoid picky compiler warnings,
when assigning a NULL pointer to a function pointer var.
2007-10-17 16:58:32 +00:00
Dan Fandrich
8147c3659d Minix doesn't support getsockopt on UDP sockets or send/recv on TCP
sockets.
2007-09-05 22:01:57 +00:00
Daniel Stenberg
375cdf89ad With lots of help from Rich Rauenza(?) in bug #1733119, we introduce a fairly
complicated work-around for 64bit HPUX compiles. We do the fix using inline
static functions to make them follow the header file properly and thus get
used fine in the test suite too etc.
2007-06-12 21:39:21 +00:00
Yang Tse
94b253fde7 Steve Little's fixes to allow compilation on VMS 64-bit mode 2007-04-25 03:00:10 +00:00
Yang Tse
84c5e846b3 convenience SIG_ATOMIC_T macro definition 2007-04-11 11:02:13 +00:00
Yang Tse
8fe9376d54 move WinSock definitions of EBADF, EINTR, EINVAL and EAFNOSUPPORT to setup_once.h 2007-04-04 06:06:36 +00:00
Yang Tse
69565afab0 Check for stdbool.h at configuration stage, and include it if available.
Check for lowercase 'bool' type at configuration stage. If not available
provide a suitable replacement with a type definition of 'unsigned char'
in setup_once.h

Move definitions of TRUE and FALSE to setup_once.h
2007-02-22 02:51:54 +00:00
Yang Tse
3a634a273a curlassert macro replaced with DEBUGASSERT macro defined in setup_once.h 2007-02-21 19:03:20 +00:00
Yang Tse
29bb6f65f1 Move header file inclusion logic and definition of timeval
struct for platforms that don't have it to setup_once.h
2007-02-20 12:12:27 +00:00
Yang Tse
ec9e399668 fix ENAMETOOLONG and ENOTEMPTY may already be defined in errno.h 2007-02-18 00:34:37 +00:00
Yang Tse
d9bf55570b Move portable error number symbolic name definitions to setup_once.h 2007-02-17 13:51:24 +00:00
Yang Tse
d21e4eb8ae introduce uppercase macros SOCKERRNO, SET_SOCKERRNO(), ERRNO and SET_ERRNO()
making them available to any source code file which includes "setup.h".

Macro SOCKERRNO / SET_SOCKERRNO() returns / sets the *socket-related* errno
(or equivalent) on this platform to hide platform details to code using it.

Macro ERRNO / SET_ERRNO() returns / sets the NOT *socket-related* errno
(or equivalent) on this platform to hide platform details to code using it.
2007-02-15 16:23:24 +00:00
Yang Tse
fbcf86b83e avoid using funtion isblank() and just use our ISBLANK
macro to provide this functionality on all platforms
2007-02-14 13:31:37 +00:00
Yang Tse
be71ccbce3 check for isblank() at configuration stage. If not available
provide a suitable replacement for use in our ISBLANK macro
2007-02-13 19:01:03 +00:00
Yang Tse
0db485a448 use our own ISUPPER and ISLOWER macros 2007-02-13 18:02:20 +00:00
Yang Tse
6d05a33ed9 use our own ISBLANK macro 2007-02-13 17:47:27 +00:00
Yang Tse
ef6f24a7ce move DEBUGF macro definition to setup_once.h 2007-02-02 15:31:32 +00:00
Yang Tse
f1918aa343 sync comment with reality 2007-01-27 01:56:20 +00:00
Daniel Stenberg
8d11767048 recv() doesn't take MSG_NOSIGNAL in its forth argument so let's not pass it.
Brendan Jurd pointed out.
2006-12-16 22:28:08 +00:00