[Midnightbsd-cvs] src [7951] trunk/sys/sys/stat.h: Put struct ostat and struct nstat under #ifdef _KERNEL.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Wed Sep 14 18:18:44 EDT 2016


Revision: 7951
          http://svnweb.midnightbsd.org/src/?rev=7951
Author:   laffer1
Date:     2016-09-14 18:18:44 -0400 (Wed, 14 Sep 2016)
Log Message:
-----------
Put struct ostat and struct nstat under #ifdef _KERNEL. The
compatibility definitions are only needed for implementation of the
syscalls, they cause namespace pollution and are not useful for
applications.

Modified Paths:
--------------
    trunk/sys/sys/stat.h

Modified: trunk/sys/sys/stat.h
===================================================================
--- trunk/sys/sys/stat.h	2016-09-14 22:17:52 UTC (rev 7950)
+++ trunk/sys/sys/stat.h	2016-09-14 22:18:44 UTC (rev 7951)
@@ -99,7 +99,7 @@
 #include <sys/time.h>
 #endif
 
-#if __BSD_VISIBLE
+#ifdef _KERNEL
 struct ostat {
 	__uint16_t st_dev;		/* inode's device */
 	ino_t	  st_ino;		/* inode's number */
@@ -117,7 +117,7 @@
 	fflags_t  st_flags;		/* user defined flags for file */
 	__uint32_t st_gen;		/* file generation number */
 };
-#endif /* __BSD_VISIBLE */
+#endif
 
 struct stat {
 	__dev_t   st_dev;		/* inode's device */
@@ -149,7 +149,7 @@
 	unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
 };
 
-#if __BSD_VISIBLE
+#ifdef _KERNEL
 struct nstat {
 	__dev_t   st_dev;		/* inode's device */
 	ino_t	  st_ino;		/* inode's number */



More information about the Midnightbsd-cvs mailing list