Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-alt r1687 - trunk/baselayout-prefix/src
Date: Thu, 31 Mar 2011 14:14:18
Message-Id: 20110331141223.970B020054@flycatcher.gentoo.org
1 Author: grobian
2 Date: 2011-03-31 14:12:21 +0000 (Thu, 31 Mar 2011)
3 New Revision: 1687
4
5 Modified:
6 trunk/baselayout-prefix/src/start-stop-daemon.c
7 Log:
8 applied baselayout-1.12.5-termios_h.patch
9
10 <termios.h> is standard as per SUSv2 already:
11 http://pubs.opengroup.org/onlinepubs/007908799/xsh/termios.h.html
12 AIX does not provide <sys/termios.h> at all, Linux, Solaris, HP-UX,
13 Darwin and Interix have both, redirecting one to the other.
14
15 Modified: trunk/baselayout-prefix/src/start-stop-daemon.c
16 ===================================================================
17 --- trunk/baselayout-prefix/src/start-stop-daemon.c 2011-03-31 14:12:12 UTC (rev 1686)
18 +++ trunk/baselayout-prefix/src/start-stop-daemon.c 2011-03-31 14:12:21 UTC (rev 1687)
19 @@ -37,6 +37,9 @@
20 #define NONRETURNING \
21 __attribute__((noreturn))
22
23 +#define HAVE_TERMIOS_H
24 +#undef HAVE_SYS_TERMIOS_H
25 +
26 #if defined(linux) || (defined(__FreeBSD_kernel__) && defined(__GLIBC__))
27 # define OSLinux
28 #elif defined(__GNU__)
29 @@ -97,7 +100,11 @@
30 #include <grp.h>
31 #include <sys/ioctl.h>
32 #include <sys/types.h>
33 -#include <sys/termios.h>
34 +#if defined(HAVE_TERMIOS_H)
35 +# include <termios.h>
36 +#elif defined(HAVE_SYS_TERMIOS_H)
37 +# include <sys/termios.h>
38 +#endif
39 #include <fcntl.h>
40 #include <limits.h>
41 #include <assert.h>