# HG changeset patch # User John W. Eaton # Date 1264106479 18000 # Node ID 0522a65bcd56a3e64fd12b992e597f56f5e7fe8b # Parent a668fbd32e34bee7f2509b8d6e85de884f6d6568 assume unistd.h and sys/types.h exist diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-01-21 John W. Eaton + + * bootstrap.conf (gnulib_modules): Include sys_stat in the list. + * configure.ac: Don't check for sys/types.h or unistd.h. + 2010-01-21 John W. Eaton * bootstrap.conf (gnulib_modules): Include unistd in the list. diff --git a/bootstrap.conf b/bootstrap.conf --- a/bootstrap.conf +++ b/bootstrap.conf @@ -36,6 +36,7 @@ strftime strptime symlink + sys_stat times unistd unlink diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -1460,8 +1460,8 @@ floatingpoint.h grp.h ieeefp.h inttypes.h limits.h locale.h memory.h nan.h \ ncurses.h poll.h pthread.h pwd.h stdint.h stdlib.h string.h sunmath.h sys/ioctl.h \ sys/param.h sys/poll.h sys/resource.h sys/select.h sys/stat.h \ - sys/time.h sys/times.h sys/types.h sys/utsname.h sys/utime.h termcap.h \ - unistd.h utime.h varargs.h) + sys/time.h sys/times.h sys/utsname.h sys/utime.h termcap.h \ + utime.h varargs.h) ### C++ headers diff --git a/liboctave/CMatrix.cc b/liboctave/CMatrix.cc --- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -34,9 +34,7 @@ #include // FIXME -#ifdef HAVE_SYS_TYPES_H #include -#endif #include "Array-util.h" #include "CMatrix.h" diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,13 @@ +2010-01-21 John W. Eaton + + * CMatrix.cc, fCMatrix.cc, cmd-edit.cc, cmd-hist.cc, + file-ops.cc, file-ops.h, file-stat.cc, file-stat.h, filemode.c, + kpse.cc, lo-cutils.c, lo-sysdep.cc, lo-utils.cc, oct-env.cc, + oct-group.cc, oct-group.h, oct-passwd.cc, oct-passwd.h, + oct-time.cc, oct-syscalls.cc, oct-syscalls.h, statdefs.h, + sysdir.h, syswait.h, tempname.c, regex-match.h: + Assume sys/types.h and unistd.h are present (gnulib provides them). + 2010-01-21 John W. Eaton * file-ops.h, file-ops.cc, lo-utils.h, lo-cutils.c: Untabify. diff --git a/liboctave/cmd-edit.cc b/liboctave/cmd-edit.cc --- a/liboctave/cmd-edit.cc +++ b/liboctave/cmd-edit.cc @@ -30,12 +30,8 @@ #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "quit.h" diff --git a/liboctave/cmd-hist.cc b/liboctave/cmd-hist.cc --- a/liboctave/cmd-hist.cc +++ b/liboctave/cmd-hist.cc @@ -46,12 +46,8 @@ #include #endif -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "oct-rl-hist.h" diff --git a/liboctave/fCMatrix.cc b/liboctave/fCMatrix.cc --- a/liboctave/fCMatrix.cc +++ b/liboctave/fCMatrix.cc @@ -34,9 +34,7 @@ #include // FIXME -#ifdef HAVE_SYS_TYPES_H #include -#endif #include "Array-util.h" #include "DET.h" diff --git a/liboctave/file-ops.cc b/liboctave/file-ops.cc --- a/liboctave/file-ops.cc +++ b/liboctave/file-ops.cc @@ -33,9 +33,7 @@ #include #include -#ifdef HAVE_SYS_TYPES_H #include -#endif #include diff --git a/liboctave/file-ops.h b/liboctave/file-ops.h --- a/liboctave/file-ops.h +++ b/liboctave/file-ops.h @@ -25,9 +25,7 @@ #include -#ifdef HAVE_SYS_TYPES_H #include -#endif #include "str-vec.h" diff --git a/liboctave/file-stat.cc b/liboctave/file-stat.cc --- a/liboctave/file-stat.cc +++ b/liboctave/file-stat.cc @@ -28,12 +28,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "file-ops.h" #include "file-stat.h" diff --git a/liboctave/file-stat.h b/liboctave/file-stat.h --- a/liboctave/file-stat.h +++ b/liboctave/file-stat.h @@ -28,9 +28,7 @@ #include "oct-time.h" -#ifdef HAVE_SYS_TYPES_H #include -#endif class OCTAVE_API diff --git a/liboctave/filemode.c b/liboctave/filemode.c --- a/liboctave/filemode.c +++ b/liboctave/filemode.c @@ -20,9 +20,7 @@ #include #endif -#ifdef HAVE_SYS_TYPES_H #include -#endif #include #if !S_IRUSR diff --git a/liboctave/kpse.cc b/liboctave/kpse.cc --- a/liboctave/kpse.cc +++ b/liboctave/kpse.cc @@ -105,12 +105,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "sysdir.h" #include "statdefs.h" diff --git a/liboctave/lo-cutils.c b/liboctave/lo-cutils.c --- a/liboctave/lo-cutils.c +++ b/liboctave/lo-cutils.c @@ -39,12 +39,8 @@ #define _XOPEN_SOURCE #endif -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include #include diff --git a/liboctave/lo-sysdep.cc b/liboctave/lo-sysdep.cc --- a/liboctave/lo-sysdep.cc +++ b/liboctave/lo-sysdep.cc @@ -28,12 +28,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #ifdef HAVE_FCNTL_H #include diff --git a/liboctave/lo-utils.cc b/liboctave/lo-utils.cc --- a/liboctave/lo-utils.cc +++ b/liboctave/lo-utils.cc @@ -34,12 +34,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "quit.h" diff --git a/liboctave/oct-env.cc b/liboctave/oct-env.cc --- a/liboctave/oct-env.cc +++ b/liboctave/oct-env.cc @@ -47,12 +47,8 @@ #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "file-ops.h" #include "lo-error.h" diff --git a/liboctave/oct-group.cc b/liboctave/oct-group.cc --- a/liboctave/oct-group.cc +++ b/liboctave/oct-group.cc @@ -25,9 +25,7 @@ #include #endif -#ifdef HAVE_SYS_TYPES_H #include -#endif #ifdef HAVE_GRP_H #include diff --git a/liboctave/oct-group.h b/liboctave/oct-group.h --- a/liboctave/oct-group.h +++ b/liboctave/oct-group.h @@ -25,9 +25,7 @@ #include -#ifdef HAVE_SYS_TYPES_H #include -#endif #include "str-vec.h" diff --git a/liboctave/oct-passwd.cc b/liboctave/oct-passwd.cc --- a/liboctave/oct-passwd.cc +++ b/liboctave/oct-passwd.cc @@ -24,9 +24,7 @@ #include #endif -#ifdef HAVE_SYS_TYPES_H #include -#endif #ifdef HAVE_PWD_H #include diff --git a/liboctave/oct-passwd.h b/liboctave/oct-passwd.h --- a/liboctave/oct-passwd.h +++ b/liboctave/oct-passwd.h @@ -25,9 +25,7 @@ #include -#ifdef HAVE_SYS_TYPES_H #include -#endif class OCTAVE_API diff --git a/liboctave/oct-syscalls.cc b/liboctave/oct-syscalls.cc --- a/liboctave/oct-syscalls.cc +++ b/liboctave/oct-syscalls.cc @@ -30,13 +30,8 @@ #include -#ifdef HAVE_SYS_TYPES_H #include -#endif - -#ifdef HAVE_UNISTD_H #include -#endif #ifdef HAVE_FCNTL_H #include diff --git a/liboctave/oct-syscalls.h b/liboctave/oct-syscalls.h --- a/liboctave/oct-syscalls.h +++ b/liboctave/oct-syscalls.h @@ -28,9 +28,7 @@ class string_vector; -#ifdef HAVE_SYS_TYPES_H #include -#endif struct OCTAVE_API diff --git a/liboctave/oct-time.cc b/liboctave/oct-time.cc --- a/liboctave/oct-time.cc +++ b/liboctave/oct-time.cc @@ -27,12 +27,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #if defined (OCTAVE_USE_WINDOWS_API) #define WIN32_LEAN_AND_MEAN diff --git a/liboctave/regex-match.h b/liboctave/regex-match.h --- a/liboctave/regex-match.h +++ b/liboctave/regex-match.h @@ -29,9 +29,7 @@ #if defined (__MINGW32__) #define __restrict #endif -#if defined (HAVE_SYS_TYPES_H) #include -#endif #include #endif diff --git a/liboctave/statdefs.h b/liboctave/statdefs.h --- a/liboctave/statdefs.h +++ b/liboctave/statdefs.h @@ -24,9 +24,7 @@ #if !defined (octave_statdefs_h) #define octave_statdefs_h 1 -#ifdef HAVE_SYS_TYPES_H #include -#endif #ifdef HAVE_SYS_STAT_H #include diff --git a/liboctave/sysdir.h b/liboctave/sysdir.h --- a/liboctave/sysdir.h +++ b/liboctave/sysdir.h @@ -27,12 +27,8 @@ // unistd.h defines _POSIX_VERSION on POSIX.1 systems. -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #if defined (HAVE_DIRENT_H) || defined (_POSIX_VERSION) #include diff --git a/liboctave/syswait.h b/liboctave/syswait.h --- a/liboctave/syswait.h +++ b/liboctave/syswait.h @@ -29,9 +29,7 @@ /* This mess suggested by the autoconf manual. */ -#ifdef HAVE_SYS_TYPES_H #include -#endif #if defined (NeXT) && ! defined (_POSIX_SOURCE) #define HAVE_SYS_WAIT_H diff --git a/liboctave/tempname.c b/liboctave/tempname.c --- a/liboctave/tempname.c +++ b/liboctave/tempname.c @@ -28,12 +28,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2010-01-21 John W. Eaton + + * DLD-FUNCTIONS/getrusage.cc, DLD-FUNCTIONS/getgrent.cc, + DLD-FUNCTIONS/getpwent.cc, DLD-FUNCTIONS/regexp.cc, lex.ll, + cutils.c, data.cc, defaults.cc, dirfns.cc, file-io.cc, help.cc, + input.cc, oct-hist.cc, oct-procbuf.cc, oct-procbuf.h, octave.cc, + pager.h, procstream.h, sighandlers.cc, toplev.cc, syscalls.cc, + sysdep.cc, utils.cc: Assume sys/types.h and unistd.h are present + (gnulib provides them). + 2010-01-21 Jaroslav Hajek * ov-base.h (octave_base_value::dim_vector): Return 0x0 by default. diff --git a/src/DLD-FUNCTIONS/getgrent.cc b/src/DLD-FUNCTIONS/getgrent.cc --- a/src/DLD-FUNCTIONS/getgrent.cc +++ b/src/DLD-FUNCTIONS/getgrent.cc @@ -27,9 +27,7 @@ #include -#ifdef HAVE_SYS_TYPES_H #include -#endif #include "oct-group.h" diff --git a/src/DLD-FUNCTIONS/getpwent.cc b/src/DLD-FUNCTIONS/getpwent.cc --- a/src/DLD-FUNCTIONS/getpwent.cc +++ b/src/DLD-FUNCTIONS/getpwent.cc @@ -27,9 +27,7 @@ #include -#ifdef HAVE_SYS_TYPES_H #include -#endif #include "oct-passwd.h" diff --git a/src/DLD-FUNCTIONS/getrusage.cc b/src/DLD-FUNCTIONS/getrusage.cc --- a/src/DLD-FUNCTIONS/getrusage.cc +++ b/src/DLD-FUNCTIONS/getrusage.cc @@ -27,9 +27,7 @@ #include "systime.h" -#ifdef HAVE_SYS_TYPES_H #include -#endif #ifdef HAVE_SYS_RESOURCE_H #include diff --git a/src/DLD-FUNCTIONS/regexp.cc b/src/DLD-FUNCTIONS/regexp.cc --- a/src/DLD-FUNCTIONS/regexp.cc +++ b/src/DLD-FUNCTIONS/regexp.cc @@ -47,9 +47,7 @@ #if defined (__MINGW32__) #define __restrict #endif -#if defined (HAVE_SYS_TYPES_H) #include -#endif #include #endif diff --git a/src/cutils.c b/src/cutils.c --- a/src/cutils.c +++ b/src/cutils.c @@ -35,12 +35,8 @@ #else -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "systime.h" diff --git a/src/data.cc b/src/data.cc --- a/src/data.cc +++ b/src/data.cc @@ -29,9 +29,7 @@ #include "systime.h" -#ifdef HAVE_SYS_TYPES_H #include -#endif #ifdef HAVE_SYS_RESOURCE_H #include diff --git a/src/defaults.cc b/src/defaults.cc --- a/src/defaults.cc +++ b/src/defaults.cc @@ -31,12 +31,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "dir-ops.h" #include "oct-env.h" diff --git a/src/dirfns.cc b/src/dirfns.cc --- a/src/dirfns.cc +++ b/src/dirfns.cc @@ -34,12 +34,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "file-ops.h" #include "file-stat.h" diff --git a/src/file-io.cc b/src/file-io.cc --- a/src/file-io.cc +++ b/src/file-io.cc @@ -47,12 +47,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #ifdef HAVE_ZLIB_H #include diff --git a/src/help.cc b/src/help.cc --- a/src/help.cc +++ b/src/help.cc @@ -34,12 +34,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "cmd-edit.h" #include "file-ops.h" diff --git a/src/input.cc b/src/input.cc --- a/src/input.cc +++ b/src/input.cc @@ -36,12 +36,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "cmd-edit.h" #include "file-ops.h" diff --git a/src/lex.ll b/src/lex.ll --- a/src/lex.ll +++ b/src/lex.ll @@ -47,12 +47,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "cmd-edit.h" #include "quit.h" diff --git a/src/oct-hist.cc b/src/oct-hist.cc --- a/src/oct-hist.cc +++ b/src/oct-hist.cc @@ -43,12 +43,8 @@ #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "cmd-hist.h" #include "file-ops.h" diff --git a/src/oct-procbuf.cc b/src/oct-procbuf.cc --- a/src/oct-procbuf.cc +++ b/src/oct-procbuf.cc @@ -29,12 +29,8 @@ #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "lo-mappers.h" #include "lo-utils.h" diff --git a/src/oct-procbuf.h b/src/oct-procbuf.h --- a/src/oct-procbuf.h +++ b/src/oct-procbuf.h @@ -26,9 +26,7 @@ #if !defined (octave_octave_procbuf_h) #define octave_octave_procbuf_h 1 -#ifdef HAVE_SYS_TYPES_H #include -#endif #include "c-file-ptr-stream.h" diff --git a/src/octave.cc b/src/octave.cc --- a/src/octave.cc +++ b/src/octave.cc @@ -35,12 +35,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "cmd-edit.h" #include "f77-fcn.h" diff --git a/src/pager.h b/src/pager.h --- a/src/pager.h +++ b/src/pager.h @@ -28,9 +28,7 @@ #include #include -#ifdef HAVE_SYS_TYPES_H #include -#endif class OCTINTERP_API diff --git a/src/procstream.h b/src/procstream.h --- a/src/procstream.h +++ b/src/procstream.h @@ -27,9 +27,7 @@ #include #include -#ifdef HAVE_SYS_TYPES_H #include -#endif #include "oct-procbuf.h" diff --git a/src/sighandlers.cc b/src/sighandlers.cc --- a/src/sighandlers.cc +++ b/src/sighandlers.cc @@ -30,12 +30,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "cmd-edit.h" #include "oct-syscalls.h" diff --git a/src/syscalls.cc b/src/syscalls.cc --- a/src/syscalls.cc +++ b/src/syscalls.cc @@ -33,12 +33,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #ifdef HAVE_FCNTL_H #include diff --git a/src/sysdep.cc b/src/sysdep.cc --- a/src/sysdep.cc +++ b/src/sysdep.cc @@ -34,12 +34,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #if defined (HAVE_TERMIOS_H) #include diff --git a/src/toplev.cc b/src/toplev.cc --- a/src/toplev.cc +++ b/src/toplev.cc @@ -36,12 +36,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "cmd-edit.h" #include "file-ops.h" diff --git a/src/utils.cc b/src/utils.cc --- a/src/utils.cc +++ b/src/utils.cc @@ -33,12 +33,8 @@ #include #include -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #include -#endif #include "quit.h"