[Midnightbsd-cvs] src [7949] trunk: fix symbol visibility and style issues

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


Revision: 7949
          http://svnweb.midnightbsd.org/src/?rev=7949
Author:   laffer1
Date:     2016-09-14 18:14:56 -0400 (Wed, 14 Sep 2016)
Log Message:
-----------
fix symbol visibility and style issues

Modified Paths:
--------------
    trunk/lib/libc/sys/fcntl.c
    trunk/sys/kern/kern_descrip.c
    trunk/sys/sys/fcntl.h

Modified: trunk/lib/libc/sys/fcntl.c
===================================================================
--- trunk/lib/libc/sys/fcntl.c	2016-09-14 22:14:15 UTC (rev 7948)
+++ trunk/lib/libc/sys/fcntl.c	2016-09-14 22:14:56 UTC (rev 7949)
@@ -41,7 +41,7 @@
 {
 	va_list args;
 	long arg;
-	struct oflock ofl;
+	struct __oflock ofl;
 	struct flock *flp;
 	int res;
 

Modified: trunk/sys/kern/kern_descrip.c
===================================================================
--- trunk/sys/kern/kern_descrip.c	2016-09-14 22:14:15 UTC (rev 7948)
+++ trunk/sys/kern/kern_descrip.c	2016-09-14 22:14:56 UTC (rev 7949)
@@ -364,7 +364,7 @@
 sys_fcntl(struct thread *td, struct fcntl_args *uap)
 {
 	struct flock fl;
-	struct oflock ofl;
+	struct __oflock ofl;
 	intptr_t arg;
 	int error;
 	int cmd;

Modified: trunk/sys/sys/fcntl.h
===================================================================
--- trunk/sys/sys/fcntl.h	2016-09-14 22:14:15 UTC (rev 7948)
+++ trunk/sys/sys/fcntl.h	2016-09-14 22:14:56 UTC (rev 7949)
@@ -111,7 +111,7 @@
 
 #if __BSD_VISIBLE
 /* Attempt to bypass buffer cache */
-#define O_DIRECT	0x00010000
+#define	O_DIRECT	0x00010000
 #endif
 
 /* Defined by POSIX Extended API Set Part 2 */
@@ -213,18 +213,22 @@
 #define	F_SETFL		4		/* set file status flags */
 #if __BSD_VISIBLE || __XSI_VISIBLE || __POSIX_VISIBLE >= 200112
 #define	F_GETOWN	5		/* get SIGIO/SIGURG proc/pgrp */
-#define F_SETOWN	6		/* set SIGIO/SIGURG proc/pgrp */
+#define	F_SETOWN	6		/* set SIGIO/SIGURG proc/pgrp */
 #endif
+#if __BSD_VISIBLE
 #define	F_OGETLK	7		/* get record locking information */
 #define	F_OSETLK	8		/* set record locking information */
 #define	F_OSETLKW	9		/* F_SETLK; wait if blocked */
 #define	F_DUP2FD	10		/* duplicate file descriptor to arg */
+#endif
 #define	F_GETLK		11		/* get record locking information */
 #define	F_SETLK		12		/* set record locking information */
 #define	F_SETLKW	13		/* F_SETLK; wait if blocked */
+#if __BSD_VISIBLE
 #define	F_SETLK_REMOTE	14		/* debugging support for remote locks */
 #define	F_READAHEAD	15		/* read ahead */
 #define	F_RDAHEAD	16		/* Darwin compatible read ahead */
+#endif
 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200809
 #define	F_DUPFD_CLOEXEC	17		/* Like F_DUPFD, but FD_CLOEXEC is set */
 #endif
@@ -239,14 +243,16 @@
 #define	F_RDLCK		1		/* shared or read lock */
 #define	F_UNLCK		2		/* unlock */
 #define	F_WRLCK		3		/* exclusive or write lock */
+#if __BSD_VISIBLE
 #define	F_UNLCKSYS	4		/* purge locks for a given system ID */ 
 #define	F_CANCEL	5		/* cancel an async lock request */
+#endif
 #ifdef _KERNEL
 #define	F_WAIT		0x010		/* Wait until lock is granted */
 #define	F_FLOCK		0x020	 	/* Use flock(2) semantics for lock */
 #define	F_POSIX		0x040	 	/* Use POSIX semantics for lock */
 #define	F_REMOTE	0x080		/* Lock owner is remote NFS client */
-#define F_NOINTR	0x100		/* Ignore signals when waiting */
+#define	F_NOINTR	0x100		/* Ignore signals when waiting */
 #endif
 
 /*
@@ -262,11 +268,12 @@
 	int	l_sysid;	/* remote system id or zero for local */
 };
 
+#if __BSD_VISIBLE
 /*
  * Old advisory file segment locking data type,
  * before adding l_sysid.
  */
-struct oflock {
+struct __oflock {
 	off_t	l_start;	/* starting offset */
 	off_t	l_len;		/* len = 0 means until end of file */
 	pid_t	l_pid;		/* lock owner */
@@ -273,8 +280,8 @@
 	short	l_type;		/* lock type: read/write, etc. */
 	short	l_whence;	/* type of l_start */
 };
+#endif
 
-
 #if __BSD_VISIBLE
 /* lock operations for flock(2) */
 #define	LOCK_SH		0x01		/* shared file lock */



More information about the Midnightbsd-cvs mailing list