]> granicus.if.org Git - curl/commitdiff
test servers: build adjustment
authorYang Tse <yangsita@gmail.com>
Tue, 10 Apr 2012 15:32:06 +0000 (17:32 +0200)
committerYang Tse <yangsita@gmail.com>
Tue, 10 Apr 2012 15:32:06 +0000 (17:32 +0200)
Undefine CURL_HIDDEN_SYMBOLS libcurl private preprocessor macro that might
leak from lib/setup.h into source files where this should not be defined.

15 files changed:
tests/server/Makefile.inc
tests/server/fake_ntlm.c
tests/server/getpart.c
tests/server/getpart.h
tests/server/resolve.c
tests/server/rtspd.c
tests/server/server_setup.h [new file with mode: 0644]
tests/server/server_sockaddr.h
tests/server/sockfilt.c
tests/server/sws.c
tests/server/testpart.c
tests/server/tftp.h
tests/server/tftpd.c
tests/server/util.c
tests/server/util.h

index ff8b1084a9a80aabae145b2b632cabc286b8e288..634c6edb0ddfa8dddaf27d110c09c4721a5dee7e 100644 (file)
@@ -19,6 +19,7 @@ CURLX_HDRS = \
 USEFUL = \
  getpart.c \
  getpart.h \
+ server_setup.h \
  $(top_srcdir)/lib/base64.c \
  $(top_srcdir)/lib/curl_base64.h \
  $(top_srcdir)/lib/memdebug.c \
index 9bed5963d4f3d333a4b441947062f0baadca27fe..4af334d6e0695f8b4f25421fa1580ac2a61027c3 100644 (file)
@@ -5,7 +5,8 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Mandy Wu, <mandy.wu@intel.com>
+ * Copyright (C) 2010, Mandy Wu, <mandy.wu@intel.com>
+ * Copyright (C) 2011 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -19,6 +20,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
 /*
  * This is a fake ntlm_auth, which is used for testing NTLM single-sign-on.
  * responses with a pre-written string saved in test case test2005.
  */
 
-#define CURL_NO_OLDIES
-
-#include "setup.h"
-
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 9384d0cb0572861a4cfde072bf3fd77b09c5a9c1..f37f88cba69a550e29d437512c9d568b2af59954 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
  * KIND, either express or implied.
  *
  ***************************************************************************/
-
-#define CURL_NO_OLDIES
-
-#include "setup.h"
+#include "server_setup.h"
 
 #include "getpart.h"
 
index 78a0be2cd2d175e8cca8a707cff136c4d41edb04..25320b08b524a11ab7b92ce9ab228c7d02612dff 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef HEADER_SERVER_GETPART_H
-#define HEADER_SERVER_GETPART_H
+#ifndef HEADER_CURL_SERVER_GETPART_H
+#define HEADER_CURL_SERVER_GETPART_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,6 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
 #define GPE_NO_BUFFER_SPACE -2
 #define GPE_OUT_OF_MEMORY   -1
@@ -30,4 +31,4 @@
 int getpart(char **outbuf, size_t *outlen,
             const char *main, const char *sub, FILE *stream);
 
-#endif /* HEADER_SERVER_GETPART_H */
+#endif /* HEADER_CURL_SERVER_GETPART_H */
index 26ad853009867ad6bb37a4d3fb3c25efa4bfbca3..3237589730270eadbfb3792c7cc1ebcabdcf2925 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -19,6 +19,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
 /* Purpose
  *
  *
  */
 
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
-
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
index 5c06729ea7a0119c78122492f3467e41f3ec1594..e68c609436bd2725f39058ad301cfe379abcbd7f 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -19,6 +19,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
 /*
  * curl's test suite Real Time Streaming Protocol (RTSP) server.
  * This source file was started based on curl's HTTP test suite server.
  */
 
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
-
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
diff --git a/tests/server/server_setup.h b/tests/server/server_setup.h
new file mode 100644 (file)
index 0000000..4d8ae9e
--- /dev/null
@@ -0,0 +1,31 @@
+#ifndef HEADER_CURL_SERVER_SETUP_H
+#define HEADER_CURL_SERVER_SETUP_H
+/***************************************************************************
+ *                                  _   _ ____  _
+ *  Project                     ___| | | |  _ \| |
+ *                             / __| | | | |_) | |
+ *                            | (__| |_| |  _ <| |___
+ *                             \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://curl.haxx.se/docs/copyright.html.
+ *
+ * You may opt to use, copy, modify, merge, publish, distribute and/or sell
+ * copies of the Software, and permit persons to whom the Software is
+ * furnished to do so, under the terms of the COPYING file.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ***************************************************************************/
+
+#define CURL_NO_OLDIES
+
+#include "setup.h" /* portability help from the lib directory */
+
+#undef CURL_HIDDEN_SYMBOLS /* libcurl internal use only */
+
+#endif /* HEADER_CURL_SERVER_SETUP_H */
index e2c059a2471dd4a7b4da7f972858c10cf9817178..6a17fe0077076bf0561d365911827a365ca76a76 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef HEADER_SERVER_SOCKADDR_H
-#define HEADER_SERVER_SOCKADDR_H
+#ifndef HEADER_CURL_SERVER_SOCKADDR_H
+#define HEADER_CURL_SERVER_SOCKADDR_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,6 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
 typedef union {
   struct sockaddr      sa;
@@ -30,4 +31,4 @@ typedef union {
 #endif
 } srvr_sockaddr_union_t;
 
-#endif /* HEADER_SERVER_SOCKADDR_H */
+#endif /* HEADER_CURL_SERVER_SOCKADDR_H */
index 823b9016161cc720eff4216ad2fd7df410031a4d..e04cd3356529b7996828f3dfb22663e89cfc9cb6 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -19,6 +19,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
 /* Purpose
  *
  * if no signal was being ignored or handled at all.  Enjoy it!
  */
 
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
-
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
index ef54bc65ea2f9a89d01add22c39b9c5c00e35492..14369e1d51140d786f930d104abc35e39954c069 100644 (file)
@@ -19,6 +19,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
 /* sws.c: simple (silly?) web server
 
 
  */
 
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
-
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
 #endif
index 94097145038c706f1ca49ae54566ce03a2680e35..912096f0b9c4da6a3c4f816485eac940be07bfc8 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
  * KIND, either express or implied.
  *
  ***************************************************************************/
-
-#define CURL_NO_OLDIES
-
-#include "setup.h"
+#include "server_setup.h"
 
 #include "getpart.h"
 
index f60f12257055719141108876025ad785c43adfd1..461ab9a36b19599b32f6d9658cd1dd7fca12b6be 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __SERVER_TFTP_H
-#define __SERVER_TFTP_H
+#ifndef HEADER_CURL_SERVER_TFTP_H
+#define HEADER_CURL_SERVER_TFTP_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -21,6 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
 /* This file is a rewrite/clone of the arpa/tftp.h file for systems without
    it. */
@@ -54,4 +55,4 @@ struct tftphdr {
 #define EEXISTS   6
 #define ENOUSER   7
 
-#endif /* __SERVER_TFTP_H */
+#endif /* HEADER_CURL_SERVER_TFTP_H */
index 92fb717b76aca20d74e0495276a75c6770b6aab7..62c95e65dc6ec551d6d3e74993588df57b04491b 100644 (file)
@@ -47,9 +47,7 @@
  * SUCH DAMAGE.
  */
 
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
+#include "server_setup.h"
 
 #ifdef HAVE_SYS_IOCTL_H
 #include <sys/ioctl.h>
index 602f11e14158cedd93f98cd7ea0fa7a2afe68741..c6a404bbb742b62fb5744483b8d68f1a70b85a34 100644 (file)
  * KIND, either express or implied.
  *
  ***************************************************************************/
-
-#define CURL_NO_OLDIES
-
-#include "setup.h" /* portability help from the lib directory */
+#include "server_setup.h"
 
 #ifdef HAVE_SIGNAL_H
 #include <signal.h>
index e1c8f9ac3e0d5e2f497112f48369a6cd51be2660..8d2e582c27176a2e914d45256e0649cc6cee2034 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef __SERVER_UTIL_H
-#define __SERVER_UTIL_H
+#ifndef HEADER_CURL_SERVER_UTIL_H
+#define HEADER_CURL_SERVER_UTIL_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -21,6 +21,7 @@
  * KIND, either express or implied.
  *
  ***************************************************************************/
+#include "server_setup.h"
 
 char *data_to_hex(char *data, size_t len);
 void logmsg(const char *msg, ...);
@@ -62,4 +63,4 @@ void set_advisor_read_lock(const char *filename);
 
 void clear_advisor_read_lock(const char *filename);
 
-#endif  /* __SERVER_UTIL_H */
+#endif  /* HEADER_CURL_SERVER_UTIL_H */