Author: guillem
Date: 2006-02-14 06:43:04 +0000 (Tue, 14 Feb 2006)
New Revision: 1194

Added:
   trunk/libbsd/include/bsd/cdefs.h
Modified:
   trunk/libbsd/ChangeLog
   trunk/libbsd/Makefile
   trunk/libbsd/include/bsd/bsd.h
Log:
Move some macros to cdefs.h.


Modified: trunk/libbsd/ChangeLog
===================================================================
--- trunk/libbsd/ChangeLog      2006-02-14 05:39:29 UTC (rev 1193)
+++ trunk/libbsd/ChangeLog      2006-02-14 06:43:04 UTC (rev 1194)
@@ -1,5 +1,13 @@
 2006-02-14  Guillem Jover  <[EMAIL PROTECTED]>
 
+       * include/bsd/bsd.h (setproctitle, __dead2, __unused, __printflike)
+       (__FBSDID): Moved to ...
+       * include/bsd/cdefs.h: ... here.
+       (__unused, __printflike) [__GNUC__]: Use proper __attribute__.
+       * Makefile (LIB_INCLUDES): Add 'cdefs.h'.
+
+2006-02-14  Guillem Jover  <[EMAIL PROTECTED]>
+
        * arc4random.c: Move to ...
        * src/arc4random.c: ... here.
        * bsd_getopt.c: Move to ...

Modified: trunk/libbsd/Makefile
===================================================================
--- trunk/libbsd/Makefile       2006-02-14 05:39:29 UTC (rev 1193)
+++ trunk/libbsd/Makefile       2006-02-14 06:43:04 UTC (rev 1194)
@@ -9,7 +9,7 @@
 LIB_SRCS := $(patsubst %,src/%,$(LIB_SRCS))
 
 LIB_INCLUDES := err.h getopt.h ip_icmp.h random.h queue.h md5.h string.h \
-               bsd.h stdlib.h
+               bsd.h cdefs.h stdlib.h
 LIB_INCLUDES := $(patsubst %,include/bsd/%,$(LIB_INCLUDES))
 
 LIB_MANS := arc4random.3 strlcpy.3 fgetln.3 fmtcheck.3

Modified: trunk/libbsd/include/bsd/bsd.h
===================================================================
--- trunk/libbsd/include/bsd/bsd.h      2006-02-14 05:39:29 UTC (rev 1193)
+++ trunk/libbsd/include/bsd/bsd.h      2006-02-14 06:43:04 UTC (rev 1194)
@@ -2,22 +2,10 @@
 #define LIBBSD_H
 
 /*
- * Generic definitions.
- */
-
-#define setproctitle(fmt, args...)
-
-#define __dead2
-#define __unused
-#define __printflike(x,y)
-#define __FBSDID(x)
-
-#include <sys/cdefs.h>
-
-/*
  * Include all bsd compat headers.
  */
 
+#include <bsd/cdefs.h>
 #include <bsd/random.h>
 #include <bsd/string.h>
 #include <bsd/queue.h>

Added: trunk/libbsd/include/bsd/cdefs.h
===================================================================
--- trunk/libbsd/include/bsd/cdefs.h    2006-02-14 05:39:29 UTC (rev 1193)
+++ trunk/libbsd/include/bsd/cdefs.h    2006-02-14 06:43:04 UTC (rev 1194)
@@ -0,0 +1,34 @@
+#ifndef LIBBSD_CDEFS_H
+#define LIBBSD_CDEFS_H
+
+#include <sys/cdefs.h>
+
+#ifndef setproctitle
+# define setproctitle(fmt, args...)
+#endif
+
+#ifndef __dead2
+# define __dead2
+#endif
+
+#ifndef __unused
+# ifdef __GNUC__
+#  define __unused __attribute__((unused))
+# else
+#  define __unused
+# endif
+#endif
+
+#ifndef __printflike
+# ifdef __GNUC__
+#  define __printflike(x, y) __attribute((format(printf, (x), (y))))
+# else
+#  define __printflike(x, y)
+# endif
+#endif
+
+#ifndef __FBSDID
+# define __FBSDID(x)
+#endif
+
+#endif


Property changes on: trunk/libbsd/include/bsd/cdefs.h
___________________________________________________________________
Name: svn:keywords
   + Id Revision


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to