Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Include <sys/cdefs.h>, <sys/featuretest.h>, and <sys...



details:   https://anonhg.NetBSD.org/src/rev/9fb9b73a8557
branches:  trunk
changeset: 341025:9fb9b73a8557
user:      dholland <dholland%NetBSD.org@localhost>
date:      Thu Oct 15 06:15:22 2015 +0000

description:
Include <sys/cdefs.h>, <sys/featuretest.h>, and <sys/ansi.h>
unconditionally, not only #ifndef _KERNEL. The kernel declarations
require cdefs.h and standard practice is to include cdefs.h where it's
used; they also require sys/ansi.h; and while they don't require
featuretest.h it's also harmless... and includes should be at the top
anyhow.

PR 46557 from Richard Hansen.

diffstat:

 sys/sys/syslog.h |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r 7464fe2e5951 -r 9fb9b73a8557 sys/sys/syslog.h
--- a/sys/sys/syslog.h  Thu Oct 15 02:40:38 2015 +0000
+++ b/sys/sys/syslog.h  Thu Oct 15 06:15:22 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: syslog.h,v 1.37 2015/10/14 15:52:40 christos Exp $     */
+/*     $NetBSD: syslog.h,v 1.38 2015/10/15 06:15:22 dholland Exp $     */
 
 /*
  * Copyright (c) 1982, 1986, 1988, 1993
@@ -34,6 +34,10 @@
 #ifndef _SYS_SYSLOG_H_
 #define _SYS_SYSLOG_H_
 
+#include <sys/cdefs.h>
+#include <sys/featuretest.h>
+#include <sys/ansi.h>
+
 #define        _PATH_LOG       "/var/run/log"
 
 /*
@@ -193,10 +197,6 @@
     .log_mask = 0xff, \
 }
 
-#include <sys/cdefs.h>
-#include <sys/featuretest.h>
-#include <sys/ansi.h>
-
 __BEGIN_DECLS
 void   closelog(void);
 void   openlog(const char *, int, int);



Home | Main Index | Thread Index | Old Index