summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2014-02-27 22:04:39 -0500
committerMark H Weaver <mhw@netris.org>2014-02-27 22:38:48 -0500
commitbc8e6d7d8ca602c86591466f5e9d816a614700f5 (patch)
treebb4ab43f533fba68286ebdbb01a23f3969e32a9d
parentca6adcc6df462f325dfa7b099295fd6212d02b43 (diff)
Rely on Gnulib for <unistd.h>.
* libguile/async.c: * libguile/backtrace.c: * libguile/error.c: * libguile/filesys.c: * libguile/fports.c: * libguile/gc-malloc.c: * libguile/gc.c: * libguile/gdbint.c: * libguile/init.c: * libguile/ioext.c: * libguile/load.c: * libguile/mallocs.c: * libguile/mkstemp.c: * libguile/ports.c: * libguile/posix.c: * libguile/r6rs-ports.c: * libguile/random.c: * libguile/rw.c: * libguile/scmsigs.c: * libguile/script.c: * libguile/simpos.c: * libguile/socket.c: * libguile/stime.c: * libguile/strports.c: * libguile/threads.c: Unconditionally include <unistd.h>.
-rw-r--r--libguile/async.c5
-rw-r--r--libguile/backtrace.c5
-rw-r--r--libguile/error.c4
-rw-r--r--libguile/filesys.c2
-rw-r--r--libguile/fports.c2
-rw-r--r--libguile/gc-malloc.c5
-rw-r--r--libguile/gc.c4
-rw-r--r--libguile/gdbint.c6
-rw-r--r--libguile/init.c5
-rw-r--r--libguile/ioext.c5
-rw-r--r--libguile/load.c5
-rw-r--r--libguile/mallocs.c5
-rw-r--r--libguile/mkstemp.c6
-rw-r--r--libguile/ports.c5
-rw-r--r--libguile/posix.c5
-rw-r--r--libguile/r6rs-ports.c5
-rw-r--r--libguile/random.c6
-rw-r--r--libguile/rw.c4
-rw-r--r--libguile/scmsigs.c5
-rw-r--r--libguile/script.c4
-rw-r--r--libguile/simpos.c4
-rw-r--r--libguile/socket.c2
-rw-r--r--libguile/stime.c5
-rw-r--r--libguile/strports.c4
-rw-r--r--libguile/threads.c6
25 files changed, 37 insertions, 77 deletions
diff --git a/libguile/async.c b/libguile/async.c
index 66f0b04cd..419bf9b02 100644
--- a/libguile/async.c
+++ b/libguile/async.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2004, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,2000,2001, 2002, 2004, 2006, 2008,
+ * 2009, 2010, 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -38,9 +39,7 @@
#ifdef HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <full-write.h>
diff --git a/libguile/backtrace.c b/libguile/backtrace.c
index b0dc0f117..f8283ab4f 100644
--- a/libguile/backtrace.c
+++ b/libguile/backtrace.c
@@ -1,5 +1,6 @@
/* Printing of backtraces and error messages
- * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2009, 2010, 2011 Free Software Foundation
+ * Copyright (C) 1996,1997,1998,1999,2000,2001, 2003, 2004, 2006, 2009,
+ * 2010, 2011, 2014 Free Software Foundation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -26,9 +27,7 @@
#include "libguile/_scm.h"
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifdef HAVE_IO_H
#include <io.h>
#endif
diff --git a/libguile/error.c b/libguile/error.c
index 26cf5b6d6..b5565a069 100644
--- a/libguile/error.c
+++ b/libguile/error.c
@@ -1,5 +1,5 @@
/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2004, 2006, 2010,
- * 2012, 2013 Free Software Foundation, Inc.
+ * 2012, 2013, 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -40,9 +40,7 @@
#ifdef HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
/* For Windows... */
#ifdef HAVE_IO_H
diff --git a/libguile/filesys.c b/libguile/filesys.c
index 82ff910cb..09f6cf9a5 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -72,9 +72,7 @@
# endif
#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifdef LIBC_H_WITH_UNISTD_H
#include <libc.h>
diff --git a/libguile/fports.c b/libguile/fports.c
index 365d3ffe0..5549bb124 100644
--- a/libguile/fports.c
+++ b/libguile/fports.c
@@ -33,9 +33,7 @@
#ifdef HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifdef HAVE_IO_H
#include <io.h>
#endif
diff --git a/libguile/gc-malloc.c b/libguile/gc-malloc.c
index 2aff4c31a..12f52cd0d 100644
--- a/libguile/gc-malloc.c
+++ b/libguile/gc-malloc.c
@@ -1,5 +1,6 @@
/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- * 2004, 2006, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ * 2004, 2006, 2008, 2009, 2010, 2011, 2012,
+ * 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -59,9 +60,7 @@ extern unsigned long * __libc_ia64_register_backing_store_base;
#include "libguile/debug-malloc.h"
#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
/*
INIT_MALLOC_LIMIT is the initial amount of malloc usage which will
diff --git a/libguile/gc.c b/libguile/gc.c
index 01e1ace80..097cb3dac 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -1,5 +1,5 @@
/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2003, 2006,
- * 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+ * 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -69,9 +69,7 @@ extern unsigned long * __libc_ia64_register_backing_store_base;
#include "libguile/debug-malloc.h"
#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
/* Set this to != 0 if every cell that is accessed shall be checked:
*/
diff --git a/libguile/gdbint.c b/libguile/gdbint.c
index 7a0ebc985..0628c98d8 100644
--- a/libguile/gdbint.c
+++ b/libguile/gdbint.c
@@ -1,6 +1,6 @@
/* GDB interface for Guile
- * Copyright (C) 1996,1997,1999,2000,2001,2002,2004,2009,2011,2012
- * Free Software Foundation, Inc.
+ * Copyright (C) 1996,1997,1999,2000,2001,2002,2004,2009,2011,2012,
+ * 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -26,9 +26,7 @@
#include <stdio.h>
#include <string.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include "libguile/strports.h"
#include "libguile/read.h"
diff --git a/libguile/init.c b/libguile/init.c
index 455a772d8..b3203609c 100644
--- a/libguile/init.c
+++ b/libguile/init.c
@@ -1,5 +1,6 @@
/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- * 2004, 2006, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+ * 2004, 2006, 2009, 2010, 2011, 2012, 2013,
+ * 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -146,9 +147,7 @@
#ifdef HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
diff --git a/libguile/ioext.c b/libguile/ioext.c
index 089ef1a01..d324cc28d 100644
--- a/libguile/ioext.c
+++ b/libguile/ioext.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2006,
+ * 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -41,9 +42,7 @@
#ifdef HAVE_IO_H
#include <io.h>
#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
SCM_DEFINE (scm_ftell, "ftell", 1, 0, 0,
diff --git a/libguile/load.c b/libguile/load.c
index fbbbae406..50b3180e6 100644
--- a/libguile/load.c
+++ b/libguile/load.c
@@ -1,5 +1,5 @@
/* Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2004, 2006, 2008,
- * 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+ * 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -50,10 +50,7 @@
#include <sys/types.h>
#include <sys/stat.h>
-
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif /* HAVE_UNISTD_H */
#ifdef HAVE_PWD_H
#include <pwd.h>
diff --git a/libguile/mallocs.c b/libguile/mallocs.c
index 05c6a8529..de11972c0 100644
--- a/libguile/mallocs.c
+++ b/libguile/mallocs.c
@@ -1,5 +1,6 @@
/* classes: src_files
- * Copyright (C) 1995,1997,1998,2000,2001, 2006 Free Software Foundation, Inc.
+ * Copyright (C) 1995,1997,1998,2000,2001, 2006,
+ * 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -32,9 +33,7 @@
#include "libguile/mallocs.h"
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
diff --git a/libguile/mkstemp.c b/libguile/mkstemp.c
index a7eaf105b..d752d0714 100644
--- a/libguile/mkstemp.c
+++ b/libguile/mkstemp.c
@@ -1,4 +1,6 @@
-/* Copyright (C) 1991, 1992, 1996, 1998, 2001, 2006, 2013 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1996, 1998, 2001, 2006, 2013,
+ 2014 Free Software Foundation, Inc.
+
This file is derived from mkstemps.c from the GNU Libiberty Library
which in turn is derived from the GNU C Library.
@@ -33,9 +35,7 @@
#include <errno.h>
#include <stdio.h>
#include <fcntl.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
diff --git a/libguile/ports.c b/libguile/ports.c
index 720ffc1b5..be12a8d5e 100644
--- a/libguile/ports.c
+++ b/libguile/ports.c
@@ -1,5 +1,6 @@
/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2006,
- * 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
+ * 2007, 2008, 2009, 2010, 2011, 2012, 2013,
+ * 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -71,9 +72,7 @@
#include <io.h>
#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
diff --git a/libguile/posix.c b/libguile/posix.c
index 3e03c86c0..6a940e46f 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -1,5 +1,6 @@
/* Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
- * 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
+ * 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
+ * 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -46,9 +47,7 @@
# endif
#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifdef LIBC_H_WITH_UNISTD_H
#include <libc.h>
diff --git a/libguile/r6rs-ports.c b/libguile/r6rs-ports.c
index 5f3b156c0..83f899670 100644
--- a/libguile/r6rs-ports.c
+++ b/libguile/r6rs-ports.c
@@ -20,10 +20,7 @@
# include <config.h>
#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
+#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
diff --git a/libguile/random.c b/libguile/random.c
index c0b04bc05..18737aa5a 100644
--- a/libguile/random.c
+++ b/libguile/random.c
@@ -1,5 +1,6 @@
/* Copyright (C) 1999, 2000, 2001, 2003, 2005, 2006, 2009, 2010,
- * 2012, 2013 Free Software Foundation, Inc.
+ * 2012, 2013, 2014 Free Software Foundation, Inc.
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 3 of
@@ -31,10 +32,7 @@
#include <math.h>
#include <string.h>
#include <sys/types.h>
-
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include "libguile/smob.h"
#include "libguile/numbers.h"
diff --git a/libguile/rw.c b/libguile/rw.c
index a9b4a329a..a64e6f828 100644
--- a/libguile/rw.c
+++ b/libguile/rw.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2006, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2006, 2009, 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -37,9 +37,7 @@
#include "libguile/modules.h"
#include "libguile/strports.h"
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifdef HAVE_IO_H
#include <io.h>
#endif
diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c
index 97435f49c..f404b6a27 100644
--- a/libguile/scmsigs.c
+++ b/libguile/scmsigs.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2004, 2006, 2007, 2008, 2009, 2011, 2013 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2002, 2004, 2006,
+ * 2007, 2008, 2009, 2011, 2013, 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -32,9 +33,7 @@
#include <process.h> /* for mingw */
#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
diff --git a/libguile/script.c b/libguile/script.c
index 83daf8ac1..0d7b28fa8 100644
--- a/libguile/script.c
+++ b/libguile/script.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994-1998, 2000-2011 Free Software Foundation, Inc.
+/* Copyright (C) 1994-1998, 2000-2011, 2014 Free Software Foundation, Inc.
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 3 of
@@ -46,9 +46,7 @@
#include <string.h>
#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h> /* for X_OK define */
-#endif
#ifdef HAVE_IO_H
#include <io.h>
diff --git a/libguile/simpos.c b/libguile/simpos.c
index 8859d4f15..6b3f51bb2 100644
--- a/libguile/simpos.c
+++ b/libguile/simpos.c
@@ -1,5 +1,5 @@
/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2003, 2004, 2009,
- * 2010, 2012 Free Software Foundation, Inc.
+ * 2010, 2012, 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -40,9 +40,7 @@
#ifdef HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#if HAVE_SYS_WAIT_H
# include <sys/wait.h>
#endif
diff --git a/libguile/socket.c b/libguile/socket.c
index 09f4831cd..c0faae1aa 100644
--- a/libguile/socket.c
+++ b/libguile/socket.c
@@ -33,9 +33,7 @@
#ifdef HAVE_STRING_H
#include <string.h>
#endif
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <sys/types.h>
#include <sys/socket.h>
#ifdef HAVE_UNIX_DOMAIN_SOCKETS
diff --git a/libguile/stime.c b/libguile/stime.c
index 78539d9cd..f430ca492 100644
--- a/libguile/stime.c
+++ b/libguile/stime.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2013 Free Software Foundation, Inc.
+/* Copyright (C) 1995,1996,1997,1998,1999,2000,2001, 2003, 2004, 2005, 2006,
+ * 2007, 2008, 2009, 2011, 2013, 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -59,9 +60,7 @@
#include "libguile/validate.h"
#include "libguile/stime.h"
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifdef HAVE_CLOCK_GETTIME
diff --git a/libguile/strports.c b/libguile/strports.c
index 582b5e91d..f30601972 100644
--- a/libguile/strports.c
+++ b/libguile/strports.c
@@ -1,5 +1,5 @@
/* Copyright (C) 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006,
- * 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ * 2009, 2010, 2011, 2012, 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -27,9 +27,7 @@
#include "libguile/_scm.h"
#include <stdio.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include "libguile/bytevectors.h"
#include "libguile/eval.h"
diff --git a/libguile/threads.c b/libguile/threads.c
index 8fddbce89..15e491990 100644
--- a/libguile/threads.c
+++ b/libguile/threads.c
@@ -1,6 +1,6 @@
/* Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004,
- * 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
- * Free Software Foundation, Inc.
+ * 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
+ * 2014 Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
@@ -28,9 +28,7 @@
#include "libguile/_scm.h"
#include <stdlib.h>
-#if HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <stdio.h>
#ifdef HAVE_STRING_H