X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fflock.c;h=8f018e50c97253139749f7a79db8e5c9281a1993;hb=00a195984d09dcd5ac84866740d35ad322f2578b;hp=aae7fc624f1c2c9d8c8b11a8fda2ca255f1d5c45;hpb=d60f3b0c6b0f93a601acd1cfd3923f94ca05abb0;p=pspp
diff --git a/lib/flock.c b/lib/flock.c
index aae7fc624f..8f018e50c9 100644
--- a/lib/flock.c
+++ b/lib/flock.c
@@ -18,7 +18,7 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
- You should have received a copy of the GNU General Public License
+ You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see . */
#include
@@ -27,13 +27,13 @@
#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
/* _get_osfhandle */
-#include
+# include
/* LockFileEx */
-#define WIN32_LEAN_AND_MEAN
-#include
+# define WIN32_LEAN_AND_MEAN
+# include
-#include
+# include
/* Determine the current size of a file. Because the other braindead
* APIs we'll call need lower/upper 32 bit pairs, keep the file size
@@ -47,9 +47,9 @@ file_size (HANDLE h, DWORD * lower, DWORD * upper)
}
/* LOCKFILE_FAIL_IMMEDIATELY is undefined on some Windows systems. */
-#ifndef LOCKFILE_FAIL_IMMEDIATELY
-# define LOCKFILE_FAIL_IMMEDIATELY 1
-#endif
+# ifndef LOCKFILE_FAIL_IMMEDIATELY
+# define LOCKFILE_FAIL_IMMEDIATELY 1
+# endif
/* Acquire a lock. */
static BOOL
@@ -160,19 +160,17 @@ flock (int fd, int operation)
#else /* !Windows */
-#ifdef HAVE_STRUCT_FLOCK_L_TYPE
+# ifdef HAVE_STRUCT_FLOCK_L_TYPE
/* We know how to implement flock in terms of fcntl. */
-#ifdef HAVE_FCNTL_H
-#include
-#endif
+# include
-#ifdef HAVE_UNISTD_H
-#include
-#endif
+# ifdef HAVE_UNISTD_H
+# include
+# endif
-#include
-#include
+# include
+# include
int
flock (int fd, int operation)
@@ -213,10 +211,10 @@ flock (int fd, int operation)
return r;
}
-#else /* !HAVE_STRUCT_FLOCK_L_TYPE */
+# else /* !HAVE_STRUCT_FLOCK_L_TYPE */
-#error "This platform lacks flock function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib."
+# error "This platform lacks flock function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib."
-#endif /* !HAVE_STRUCT_FLOCK_L_TYPE */
+# endif /* !HAVE_STRUCT_FLOCK_L_TYPE */
#endif /* !Windows */