aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2012-04-10 17:32:06 +0200
committerYang Tse <yangsita@gmail.com>2012-04-10 17:32:06 +0200
commit4d3fb91fb45ca404322d5146f43cae93d918a9a8 (patch)
treec08f1644353f5d2b0966157ab36d7df167123993 /tests
parentbbfe1182098b2451b1f457b37c2b53fe89e537e8 (diff)
test servers: build adjustment
Undefine CURL_HIDDEN_SYMBOLS libcurl private preprocessor macro that might leak from lib/setup.h into source files where this should not be defined.
Diffstat (limited to 'tests')
-rw-r--r--tests/server/Makefile.inc1
-rw-r--r--tests/server/fake_ntlm.c8
-rw-r--r--tests/server/getpart.c7
-rw-r--r--tests/server/getpart.h9
-rw-r--r--tests/server/resolve.c7
-rw-r--r--tests/server/rtspd.c7
-rw-r--r--tests/server/server_setup.h31
-rw-r--r--tests/server/server_sockaddr.h9
-rw-r--r--tests/server/sockfilt.c7
-rw-r--r--tests/server/sws.c5
-rw-r--r--tests/server/testpart.c7
-rw-r--r--tests/server/tftp.h9
-rw-r--r--tests/server/tftpd.c4
-rw-r--r--tests/server/util.c5
-rw-r--r--tests/server/util.h7
15 files changed, 67 insertions, 56 deletions
diff --git a/tests/server/Makefile.inc b/tests/server/Makefile.inc
index ff8b1084a..634c6edb0 100644
--- a/tests/server/Makefile.inc
+++ b/tests/server/Makefile.inc
@@ -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 \
diff --git a/tests/server/fake_ntlm.c b/tests/server/fake_ntlm.c
index 9bed5963d..4af334d6e 100644
--- a/tests/server/fake_ntlm.c
+++ b/tests/server/fake_ntlm.c
@@ -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.
@@ -27,10 +29,6 @@
* 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
diff --git a/tests/server/getpart.c b/tests/server/getpart.c
index 9384d0cb0..f37f88cba 100644
--- a/tests/server/getpart.c
+++ b/tests/server/getpart.c
@@ -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,10 +19,7 @@
* KIND, either express or implied.
*
***************************************************************************/
-
-#define CURL_NO_OLDIES
-
-#include "setup.h"
+#include "server_setup.h"
#include "getpart.h"
diff --git a/tests/server/getpart.h b/tests/server/getpart.h
index 78a0be2cd..25320b08b 100644
--- a/tests/server/getpart.h
+++ b/tests/server/getpart.h
@@ -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 */
diff --git a/tests/server/resolve.c b/tests/server/resolve.c
index 26ad85300..323758973 100644
--- a/tests/server/resolve.c
+++ b/tests/server/resolve.c
@@ -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
*
@@ -30,10 +31,6 @@
*
*/
-#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/rtspd.c b/tests/server/rtspd.c
index 5c06729ea..e68c60943 100644
--- a/tests/server/rtspd.c
+++ b/tests/server/rtspd.c
@@ -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.
@@ -26,10 +27,6 @@
* 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
index 000000000..4d8ae9e8b
--- /dev/null
+++ b/tests/server/server_setup.h
@@ -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 */
diff --git a/tests/server/server_sockaddr.h b/tests/server/server_sockaddr.h
index e2c059a24..6a17fe007 100644
--- a/tests/server/server_sockaddr.h
+++ b/tests/server/server_sockaddr.h
@@ -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 */
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index 823b90161..e04cd3356 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -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
*
@@ -79,10 +80,6 @@
* 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
diff --git a/tests/server/sws.c b/tests/server/sws.c
index ef54bc65e..14369e1d5 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -19,6 +19,7 @@
* KIND, either express or implied.
*
***************************************************************************/
+#include "server_setup.h"
/* sws.c: simple (silly?) web server
@@ -27,10 +28,6 @@
*/
-#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/testpart.c b/tests/server/testpart.c
index 940971450..912096f0b 100644
--- a/tests/server/testpart.c
+++ b/tests/server/testpart.c
@@ -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,10 +19,7 @@
* KIND, either express or implied.
*
***************************************************************************/
-
-#define CURL_NO_OLDIES
-
-#include "setup.h"
+#include "server_setup.h"
#include "getpart.h"
diff --git a/tests/server/tftp.h b/tests/server/tftp.h
index f60f12257..461ab9a36 100644
--- a/tests/server/tftp.h
+++ b/tests/server/tftp.h
@@ -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 */
diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c
index 92fb717b7..62c95e65d 100644
--- a/tests/server/tftpd.c
+++ b/tests/server/tftpd.c
@@ -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>
diff --git a/tests/server/util.c b/tests/server/util.c
index 602f11e14..c6a404bbb 100644
--- a/tests/server/util.c
+++ b/tests/server/util.c
@@ -19,10 +19,7 @@
* 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>
diff --git a/tests/server/util.h b/tests/server/util.h
index e1c8f9ac3..8d2e582c2 100644
--- a/tests/server/util.h
+++ b/tests/server/util.h
@@ -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 */