summaryrefslogtreecommitdiffstats
path: root/nanohttp
diff options
context:
space:
mode:
authorGravatar snowdrop2006-02-27 00:26:23 +0000
committerGravatar snowdrop2006-02-27 00:26:23 +0000
commitc734a9e1a4fc7418911d8c50817d619221d2cd42 (patch)
tree78c4cb6456957d0dc606e82b10b12d9a539c7e02 /nanohttp
parentf2798d9d9f26f9b0fd730339feb10679fec753df (diff)
downloadcsoap-c734a9e1a4fc7418911d8c50817d619221d2cd42.tar.gz
csoap-c734a9e1a4fc7418911d8c50817d619221d2cd42.tar.bz2
Added c++ macro
#ifdef __cplusplus extern "C" { #endif ... #ifdef __cplusplus } #endf
Diffstat (limited to 'nanohttp')
-rw-r--r--nanohttp/nanohttp-common.h10
-rwxr-xr-xnanohttp/nanohttp-mime.h9
-rwxr-xr-xnanohttp/nanohttp-request.h10
-rwxr-xr-xnanohttp/nanohttp-response.h10
-rw-r--r--nanohttp/nanohttp-server.h10
-rw-r--r--nanohttp/nanohttp-socket.h9
-rw-r--r--nanohttp/nanohttp-ssl.h8
-rwxr-xr-xnanohttp/nanohttp-stream.h11
8 files changed, 68 insertions, 9 deletions
diff --git a/nanohttp/nanohttp-common.h b/nanohttp/nanohttp-common.h
index d982d51..736f84c 100644
--- a/nanohttp/nanohttp-common.h
+++ b/nanohttp/nanohttp-common.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: nanohttp-common.h,v 1.25 2006/02/18 20:14:36 snowdrop Exp $
+ * $Id: nanohttp-common.h,v 1.26 2006/02/27 00:26:23 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -24,6 +24,10 @@
#ifndef NANO_HTTP_COMMON_H
#define NANO_HTTP_COMMON_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdlib.h>
#include <time.h>
@@ -528,6 +532,8 @@ void log_info(const char *FUNC, const char *format, ...);
void log_warn(const char *FUNC, const char *format, ...);
void log_error(const char *FUNC, const char *format, ...);
-
+#ifdef __cplusplus
+}
+#endif
#endif
diff --git a/nanohttp/nanohttp-mime.h b/nanohttp/nanohttp-mime.h
index 7ee04b0..bf3c8c0 100755
--- a/nanohttp/nanohttp-mime.h
+++ b/nanohttp/nanohttp-mime.h
@@ -3,7 +3,7 @@
* | \/ | | | | \/ | | _/
* |_''_| |_| |_''_| |_'/ PARSER
*
-* $Id: nanohttp-mime.h,v 1.6 2006/01/10 11:29:05 snowdrop Exp $
+* $Id: nanohttp-mime.h,v 1.7 2006/02/27 00:26:23 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -29,6 +29,10 @@
#ifndef NANO_HTTP_MIME_PARSER_H
#define NANO_HTTP_MIME_PARSER_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <nanohttp/nanohttp-common.h>
#include <nanohttp/nanohttp-stream.h>
#include <stdlib.h>
@@ -44,5 +48,8 @@ herror_t mime_get_attachments(content_type_t * ctype,
http_input_stream_t * in,
attachments_t ** dest);
+#ifdef __cplusplus
+}
+#endif
#endif
diff --git a/nanohttp/nanohttp-request.h b/nanohttp/nanohttp-request.h
index 537cf08..d89fa91 100755
--- a/nanohttp/nanohttp-request.h
+++ b/nanohttp/nanohttp-request.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: nanohttp-request.h,v 1.4 2006/01/10 11:29:05 snowdrop Exp $
+ * $Id: nanohttp-request.h,v 1.5 2006/02/27 00:26:23 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -24,6 +24,10 @@
#ifndef NANO_HTTP_REQUEST_H
#define NANO_HTTP_REQUEST_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <nanohttp/nanohttp-stream.h>
#include <nanohttp/nanohttp-mime.h>
@@ -48,4 +52,8 @@ typedef struct hrequest
herror_t hrequest_new_from_socket(hsocket_t sock, hrequest_t ** out);
void hrequest_free(hrequest_t * req);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/nanohttp/nanohttp-response.h b/nanohttp/nanohttp-response.h
index c91c56b..bd7bb50 100755
--- a/nanohttp/nanohttp-response.h
+++ b/nanohttp/nanohttp-response.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: nanohttp-response.h,v 1.4 2006/01/10 11:29:05 snowdrop Exp $
+ * $Id: nanohttp-response.h,v 1.5 2006/02/27 00:26:23 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -24,6 +24,10 @@
#ifndef NANO_HTTP_RESPONSE_H
#define NANO_HTTP_RESPONSE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <nanohttp/nanohttp-stream.h>
#include <nanohttp/nanohttp-common.h>
#include <nanohttp/nanohttp-mime.h>
@@ -46,6 +50,8 @@ typedef struct hresponse
herror_t hresponse_new_from_socket(hsocket_t sock, hresponse_t ** out);
void hresponse_free(hresponse_t * res);
-
+#ifdef __cplusplus
+}
+#endif
#endif
diff --git a/nanohttp/nanohttp-server.h b/nanohttp/nanohttp-server.h
index 4c50d23..bf7405d 100644
--- a/nanohttp/nanohttp-server.h
+++ b/nanohttp/nanohttp-server.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: nanohttp-server.h,v 1.13 2006/02/18 20:14:36 snowdrop Exp $
+ * $Id: nanohttp-server.h,v 1.14 2006/02/27 00:26:23 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -25,6 +25,10 @@
#define NANO_HTTP_SERVER_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <nanohttp/nanohttp-common.h>
#include <nanohttp/nanohttp-socket.h>
#include <nanohttp/nanohttp-request.h>
@@ -133,4 +137,8 @@ herror_t httpd_mime_send_file(httpd_conn_t * conn,
herror_t httpd_mime_end(httpd_conn_t * conn);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/nanohttp/nanohttp-socket.h b/nanohttp/nanohttp-socket.h
index 3c4529d..f5f8aa7 100644
--- a/nanohttp/nanohttp-socket.h
+++ b/nanohttp/nanohttp-socket.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: nanohttp-socket.h,v 1.22 2006/02/18 20:14:36 snowdrop Exp $
+ * $Id: nanohttp-socket.h,v 1.23 2006/02/27 00:26:23 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003 Ferhat Ayaz
@@ -24,6 +24,10 @@
#ifndef NANO_HTTP_SOCKET_H
#define NANO_HTTP_SOCKET_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <nanohttp/nanohttp-common.h>
#include <time.h>
@@ -245,5 +249,8 @@ herror_t hsocket_read(hsocket_t sock, byte_t * buffer, int size, int force,
*/
herror_t hsocket_block(hsocket_t sock, int block);
+#ifdef __cplusplus
+}
+#endif
#endif
diff --git a/nanohttp/nanohttp-ssl.h b/nanohttp/nanohttp-ssl.h
index a0e0665..798a1ee 100644
--- a/nanohttp/nanohttp-ssl.h
+++ b/nanohttp/nanohttp-ssl.h
@@ -25,6 +25,10 @@
/* Do enter only if --with-ssl was specified by the configure script */
#ifdef HAVE_SSL
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef TRU64
#include <arpa/inet.h>
typedef unsigned int uint32_t;
@@ -116,4 +120,8 @@ int ssl_checkFatal( SSL *ssl, int status );
#endif
+#ifdef __cplusplus
+}
+#endif
+
#endif /* HAVE_SSL */
diff --git a/nanohttp/nanohttp-stream.h b/nanohttp/nanohttp-stream.h
index 20ced17..0cc3ab7 100755
--- a/nanohttp/nanohttp-stream.h
+++ b/nanohttp/nanohttp-stream.h
@@ -1,5 +1,5 @@
/******************************************************************
- * $Id: nanohttp-stream.h,v 1.7 2006/01/10 11:29:05 snowdrop Exp $
+ * $Id: nanohttp-stream.h,v 1.8 2006/02/27 00:26:23 snowdrop Exp $
*
* CSOAP Project: A http client/server library in C
* Copyright (C) 2003-2004 Ferhat Ayaz
@@ -23,6 +23,11 @@
******************************************************************/
#ifndef NANO_HTTP_STREAM_H
#define NANO_HTTP_STREAM_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdio.h>
void _log_str(char *fn, char *str, int size);
@@ -269,4 +274,8 @@ herror_t http_output_stream_write_string(http_output_stream_t * stream,
*/
herror_t http_output_stream_flush(http_output_stream_t * stream);
+#ifdef __cplusplus
+}
+#endif
+
#endif