summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2010-10-27 21:33:15 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2010-10-27 21:33:15 +0000
commit914f8584ef5ddfa21e558263ab216a7f1b3445db (patch)
tree5da8abf3f0f1893223ba3ab0ae118e841e3a6b0d
parent2287ec7b3ec768f7cb20df12c911a7ccd2d2720b (diff)
Style tweaks.
-rw-r--r--compat.h26
1 files changed, 15 insertions, 11 deletions
diff --git a/compat.h b/compat.h
index 83244541..c936b68d 100644
--- a/compat.h
+++ b/compat.h
@@ -1,4 +1,4 @@
-/* $Id: compat.h,v 1.27 2010-10-27 20:21:00 nicm Exp $ */
+/* $Id: compat.h,v 1.28 2010-10-27 21:33:15 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -16,6 +16,17 @@
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifndef __GNUC__
+#define __attribute__(a)
+#endif
+
+#ifndef __dead
+#define __dead __attribute__ ((__noreturn__))
+#endif
+#ifndef __packed
+#define __packed __attribute__ ((__packed__))
+#endif
+
#ifndef HAVE_U_INT
typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;
@@ -79,10 +90,10 @@ typedef uint64_t u_int64_t;
#include "compat/vis.h"
#endif
-#ifndef HAVE_IMSG
-#include "compat/imsg.h"
-#else
+#ifdef HAVE_IMSG
#include <imsg.h>
+#else
+#include "compat/imsg.h"
#endif
#ifdef HAVE_STDINT_H
@@ -129,13 +140,6 @@ typedef uint64_t u_int64_t;
#define SUN_LEN(sun) (sizeof (sun)->sun_path)
#endif
-#ifndef __dead
-#define __dead __attribute__ ((__noreturn__))
-#endif
-#ifndef __packed
-#define __packed __attribute__ ((__packed__))
-#endif
-
#ifndef timercmp
#define timercmp(tvp, uvp, cmp) \
(((tvp)->tv_sec == (uvp)->tv_sec) ? \