]> git.puffer.fish Git - mirror/frr.git/commitdiff
*: fix detection and usage of sys/cdefs.h
authorTimo Teräs <timo.teras@iki.fi>
Tue, 29 Jul 2014 09:41:54 +0000 (09:41 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Sun, 17 Aug 2014 23:50:19 +0000 (01:50 +0200)
This header is non-standard (though present on many systems) and
there is no standard for what it should or should not define.

Remove it where it is not really needed. But add also a configure
check, so it can be used if available but otherwise fallback to
defining the needed macroes.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
configure.ac
isisd/include-netbsd/iso.h
lib/queue.h

index 220124ab8e10c44181158750480808754cc575d7..3dba3b3577134b42f0a3c65b6e6cf1c0cf1f9d27 100755 (executable)
@@ -442,7 +442,7 @@ dnl Check other header files.
 dnl -------------------------
 AC_CHECK_HEADERS([stropts.h sys/ksym.h sys/times.h sys/select.h \
        sys/types.h linux/version.h netdb.h asm/types.h \
-       sys/param.h limits.h signal.h \
+       sys/cdefs.h sys/param.h limits.h signal.h \
        sys/socket.h netinet/in.h time.h sys/time.h])
 
 dnl Utility macro to avoid retyping includes all the time
index 1a80aec8e8fcfa6f93344a02697c8f97eb913ad3..42b9bc88def9bac6dadde329af43b07283187a15 100644 (file)
@@ -192,7 +192,7 @@ extern struct protosw isosw[];
 #else
 /* user utilities definitions from the iso library */
 
-#ifdef SUNOS_5
+#ifndef HAVE_SYS_CDEFS_H
 #define        __P(x)  x
 #define        __BEGIN_DECLS
 #define        __END_DECLS
index 70cffab1b21eae2124ef2946ffabcf932c8c82a1..48b363e24d0b338ff2547ecce739f5dad17c1b0f 100644 (file)
@@ -33,8 +33,6 @@
 #ifndef _SYS_QUEUE_H_
 #define        _SYS_QUEUE_H_
 
-#include <sys/cdefs.h>
-
 /*
  * This file defines four types of data structures: singly-linked lists,
  * singly-linked tail queues, lists and tail queues.