r1783 - in trunk/varnish-cache/include: . compat

des at projects.linpro.no des at projects.linpro.no
Mon Jul 30 10:03:42 CEST 2007


Author: des
Date: 2007-07-30 10:03:42 +0200 (Mon, 30 Jul 2007)
New Revision: 1783

Modified:
   trunk/varnish-cache/include/compat/vis.h
   trunk/varnish-cache/include/vsb.h
Log:
Avoid referencing <sys/cdefs.h> and __{BEGIN,END}_DECLS.

Based on Theo Schlossnagle's Solaris portability patch.


Modified: trunk/varnish-cache/include/compat/vis.h
===================================================================
--- trunk/varnish-cache/include/compat/vis.h	2007-07-28 15:29:31 UTC (rev 1782)
+++ trunk/varnish-cache/include/compat/vis.h	2007-07-30 08:03:42 UTC (rev 1783)
@@ -71,15 +71,17 @@
  */
 #define	UNVIS_END	1	/* no more characters */
 
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 char	*vis(char *, int, int, int);
 int	strvis(char *, const char *, int);
 int	strvisx(char *, const char *, size_t, int);
 int	strunvis(char *, const char *);
 int	strunvisx(char *, const char *, int);
 int	unvis(char *, int, int *, int);
-__END_DECLS
+#ifdef __cplusplus
+};
+#endif
 
 #endif /* !_VIS_H_ */

Modified: trunk/varnish-cache/include/vsb.h
===================================================================
--- trunk/varnish-cache/include/vsb.h	2007-07-28 15:29:31 UTC (rev 1782)
+++ trunk/varnish-cache/include/vsb.h	2007-07-30 08:03:42 UTC (rev 1783)
@@ -50,7 +50,9 @@
 	int		 s_flags;	/* flags */
 };
 
-__BEGIN_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
 /*
  * API functions
  */
@@ -73,6 +75,8 @@
 int		 vsb_len(struct vsb *);
 int		 vsb_done(struct vsb *);
 void		 vsb_delete(struct vsb *);
-__END_DECLS
+#ifdef __cplusplus
+};
+#endif
 
 #endif




More information about the varnish-commit mailing list