http://code.google.com/p/canopy-httpd/source/detail?r=1116
Added:
/trunk/src/include/canopy/cdefs.h
Deleted:
/trunk/src/include/canopy/sys.h
Modified:
/trunk/src/lib/canopy/buf.h
/trunk/src/lib/canopy/log.h
/trunk/src/lib/canopy/private.h
/trunk/src/lib/canopy/string.h
/trunk/src/lib/canopy/thread.h
=======================================
--- /dev/null
+++ /trunk/src/include/canopy/cdefs.h Sun Dec 12 12:56:04 2010
@@ -0,0 +1,79 @@
+/* $Id$ */
+/*
+ * Copyright (c) 2007 Jean-Francois Brousseau <j...@openbsd.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _CANOPY_SYS_H_
+#define _CANOPY_SYS_H_
+
+#include <sys/types.h>
+
+
+#if defined(__GNUC__)
+
+#define GCC_VERSION_EQ(x, y) (__GNUC__ == (x) && __GNUC_MINOR__ == (y))
+#define GCC_VERSION_GTEQ(x, y) \
+ ((__GNUC__ > (x)) || (__GNUC__ == (x) && __GNUC_MINOR__ >= (y)))
+
+#else
+
+#define GCC_VERSION_EQ(x, y) 0
+#define GCC_VERSION_GTEQ(x, y) 0
+
+#endif
+
+
+
+#if GCC_VERSION_GTEQ(2, 3)
+#define ATTR_FORMAT(x, y) __attribute__((__format__ (printf, x, y)))
+#endif
+
+#if GCC_VERSION_GTEQ(2, 7)
+
+#define ATTR_CONSTRUCTOR __attribute__((constructor))
+#define ATTR_DESTRUCTOR __attribute__((destructor))
+
+#else /* not gcc 2.7 or higher */
+
+#define ATTR_CONSTRUCTOR asm(".init")
+#define ATTR_DESTRUCTOR asm(".fini")
+
+#endif
+
+
+
+#ifndef ATTR_FORMAT
+#define ATTR_FORMAT(x, y)
+#endif
+
+#ifndef ATTR_CONSTRUCTOR
+#define ATTR_CONSTRUCTOR
+#endif
+
+#ifndef ATTR_DESTRUCTOR
+#define ATTR_DESTRUCTOR
+#endif
+
+
+#endif /* _CANOPY_SYS_H_ */
=======================================
--- /trunk/src/include/canopy/sys.h Sun Apr 11 21:14:24 2010
+++ /dev/null
@@ -1,79 +0,0 @@
-/* $Id$ */
-/*
- * Copyright (c) 2007 Jean-Francois Brousseau <j...@openbsd.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. The name of the author may not be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
- * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef _CANOPY_SYS_H_
-#define _CANOPY_SYS_H_
-
-#include <sys/types.h>
-
-
-#if defined(__GNUC__)
-
-#define GCC_VERSION_EQ(x, y) (__GNUC__ == (x) && __GNUC_MINOR__ == (y))
-#define GCC_VERSION_GTEQ(x, y) \
- ((__GNUC__ > (x)) || (__GNUC__ == (x) && __GNUC_MINOR__ >= (y)))
-
-#else
-
-#define GCC_VERSION_EQ(x, y) 0
-#define GCC_VERSION_GTEQ(x, y) 0
-
-#endif
-
-
-
-#if GCC_VERSION_GTEQ(2, 3)
-#define ATTR_FORMAT(x, y) __attribute__((__format__ (printf, x, y)))
-#endif
-
-#if GCC_VERSION_GTEQ(2, 7)
-
-#define ATTR_CONSTRUCTOR __attribute__((constructor))
-#define ATTR_DESTRUCTOR __attribute__((destructor))
-
-#else /* not gcc 2.7 or higher */
-
-#define ATTR_CONSTRUCTOR asm(".init")
-#define ATTR_DESTRUCTOR asm(".fini")
-
-#endif
-
-
-
-#ifndef ATTR_FORMAT
-#define ATTR_FORMAT(x, y)
-#endif
-
-#ifndef ATTR_CONSTRUCTOR
-#define ATTR_CONSTRUCTOR
-#endif
-
-#ifndef ATTR_DESTRUCTOR
-#define ATTR_DESTRUCTOR
-#endif
-
-
-#endif /* _CANOPY_SYS_H_ */
=======================================
--- /trunk/src/lib/canopy/buf.h Sun May 2 13:13:48 2010
+++ /trunk/src/lib/canopy/buf.h Sun Dec 12 12:56:04 2010
@@ -32,7 +32,7 @@
#include <stdint.h>
-#include <canopy/sys.h>
+#include <canopy/cdefs.h>
/* flags */
#define CNP_BUF_AUTOEXT 1 /* autoextend on append */
=======================================
--- /trunk/src/lib/canopy/log.h Mon Apr 26 21:00:31 2010
+++ /trunk/src/lib/canopy/log.h Sun Dec 12 12:56:04 2010
@@ -32,7 +32,7 @@
#include <stdarg.h>
-#include <canopy/sys.h>
+#include <canopy/cdefs.h>
/* logging priority levels */
enum cnp_log_pri {
=======================================
--- /trunk/src/lib/canopy/private.h Tue May 11 16:06:09 2010
+++ /trunk/src/lib/canopy/private.h Sun Dec 12 12:56:04 2010
@@ -29,7 +29,7 @@
#include <sys/types.h>
-#include <canopy/sys.h>
+#include <canopy/cdefs.h>
#include <canopy/queue.h>
#include <pthread.h>
=======================================
--- /trunk/src/lib/canopy/string.h Fri Dec 3 16:28:26 2010
+++ /trunk/src/lib/canopy/string.h Sun Dec 12 12:56:04 2010
@@ -32,7 +32,7 @@
#include <stdarg.h>
-#include <canopy/sys.h>
+#include <canopy/cdefs.h>
#if defined(__linux__)
=======================================
--- /trunk/src/lib/canopy/thread.h Mon Apr 26 21:39:04 2010
+++ /trunk/src/lib/canopy/thread.h Sun Dec 12 12:56:04 2010
@@ -32,7 +32,7 @@
#include <pthread.h>
-#include <canopy/sys.h>
+#include <canopy/cdefs.h>