mirror of
https://github.com/curl/curl.git
synced 2026-06-05 01:24:17 +03:00
move sclose/fake_sclose defs to curl_setup.h
drop the undef/refer dance, it's unnecessary.
This commit is contained in:
parent
759dea96b6
commit
0cef0cb645
4 changed files with 9 additions and 17 deletions
|
|
@ -45,9 +45,6 @@
|
|||
#undef socketpair
|
||||
#endif
|
||||
|
||||
/* sclose is probably already defined, redefine it! */
|
||||
#undef sclose
|
||||
#define sclose(x) CURL_SCLOSE(x)
|
||||
#undef fopen
|
||||
#ifdef CURL_FOPEN
|
||||
#define fopen(fname, mode) CURL_FOPEN(fname, mode)
|
||||
|
|
@ -55,8 +52,5 @@
|
|||
#undef fdopen
|
||||
#undef fclose
|
||||
|
||||
#undef fake_sclose
|
||||
#define fake_sclose(x) Curl_nop_stmt
|
||||
|
||||
#undef HEADER_CURL_MEMORY_H
|
||||
#undef HEADER_CURL_MEMDEBUG_H
|
||||
|
|
|
|||
|
|
@ -1077,14 +1077,21 @@ CURL_EXTERN ALLOC_FUNC
|
|||
FILE *curl_dbg_fdopen(int filedes, const char *mode,
|
||||
int line, const char *source);
|
||||
|
||||
#define sclose(sockfd) curl_dbg_sclose(sockfd,__LINE__,__FILE__)
|
||||
#define fake_sclose(sockfd) curl_dbg_mark_sclose(sockfd,__LINE__,__FILE__)
|
||||
#define CURL_GETADDRINFO(host,serv,hint,res) \
|
||||
curl_dbg_getaddrinfo(host, serv, hint, res, __LINE__, __FILE__)
|
||||
#define CURL_FREEADDRINFO(data) \
|
||||
curl_dbg_freeaddrinfo(data, __LINE__, __FILE__)
|
||||
#else
|
||||
|
||||
#else /* !CURLDEBUG */
|
||||
|
||||
#define sclose(x) CURL_SCLOSE(x)
|
||||
#define fake_sclose(x) Curl_nop_stmt
|
||||
#define CURL_GETADDRINFO getaddrinfo
|
||||
#define CURL_FREEADDRINFO freeaddrinfo
|
||||
#endif
|
||||
|
||||
#endif /* CURLDEBUG */
|
||||
|
||||
/* Some versions of the Android NDK is missing the declaration */
|
||||
#if defined(HAVE_GETPWUID_R) && \
|
||||
|
|
|
|||
|
|
@ -206,8 +206,6 @@ struct timeval {
|
|||
# define CURL_SCLOSE(x) close((x))
|
||||
#endif
|
||||
|
||||
#define sclose(x) CURL_SCLOSE(x)
|
||||
|
||||
/*
|
||||
* Stack-independent version of fcntl() on sockets:
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -73,13 +73,6 @@
|
|||
__LINE__, __FILE__)
|
||||
#endif
|
||||
|
||||
/* sclose is probably already defined, redefine it! */
|
||||
#undef sclose
|
||||
#define sclose(sockfd) curl_dbg_sclose(sockfd,__LINE__,__FILE__)
|
||||
|
||||
#undef fake_sclose
|
||||
#define fake_sclose(sockfd) curl_dbg_mark_sclose(sockfd,__LINE__,__FILE__)
|
||||
|
||||
#undef fopen
|
||||
#define fopen(file,mode) curl_dbg_fopen(file,mode,__LINE__,__FILE__)
|
||||
#undef fdopen
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue