Mercurial > hg > octave-lyh
changeset 10182:0522a65bcd56
assume unistd.h and sys/types.h exist
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-01-21 John W. Eaton <jwe@octave.org> + + * 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 <jwe@octave.org> * bootstrap.conf (gnulib_modules): Include unistd in the list.
--- a/bootstrap.conf +++ b/bootstrap.conf @@ -36,6 +36,7 @@ strftime strptime symlink + sys_stat times unistd unlink
--- 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
--- a/liboctave/CMatrix.cc +++ b/liboctave/CMatrix.cc @@ -34,9 +34,7 @@ #include <vector> // FIXME -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include "Array-util.h" #include "CMatrix.h"
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,13 @@ +2010-01-21 John W. Eaton <jwe@octave.org> + + * 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 <jwe@octave.org> * file-ops.h, file-ops.cc, lo-utils.h, lo-cutils.c: Untabify.
--- a/liboctave/cmd-edit.cc +++ b/liboctave/cmd-edit.cc @@ -30,12 +30,8 @@ #include <string> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include "quit.h"
--- a/liboctave/cmd-hist.cc +++ b/liboctave/cmd-hist.cc @@ -46,12 +46,8 @@ #include <fcntl.h> #endif -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include "oct-rl-hist.h"
--- a/liboctave/fCMatrix.cc +++ b/liboctave/fCMatrix.cc @@ -34,9 +34,7 @@ #include <vector> // FIXME -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include "Array-util.h" #include "DET.h"
--- a/liboctave/file-ops.cc +++ b/liboctave/file-ops.cc @@ -33,9 +33,7 @@ #include <iostream> #include <vector> -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <pathmax.h>
--- a/liboctave/file-ops.h +++ b/liboctave/file-ops.h @@ -25,9 +25,7 @@ #include <string> -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include "str-vec.h"
--- a/liboctave/file-stat.cc +++ b/liboctave/file-stat.cc @@ -28,12 +28,8 @@ #include <cerrno> #include <cstring> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include "file-ops.h" #include "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 <sys/types.h> -#endif class OCTAVE_API
--- a/liboctave/filemode.c +++ b/liboctave/filemode.c @@ -20,9 +20,7 @@ #include <config.h> #endif -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <sys/stat.h> #if !S_IRUSR
--- a/liboctave/kpse.cc +++ b/liboctave/kpse.cc @@ -105,12 +105,8 @@ #include <cerrno> #include <cassert> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include "sysdir.h" #include "statdefs.h"
--- 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 <sys/types.h> -#endif #include <unistd.h> -#endif #include <stdlib.h> #include <string.h>
--- a/liboctave/lo-sysdep.cc +++ b/liboctave/lo-sysdep.cc @@ -28,12 +28,8 @@ #include <string> #include <vector> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #ifdef HAVE_FCNTL_H #include <fcntl.h>
--- a/liboctave/lo-utils.cc +++ b/liboctave/lo-utils.cc @@ -34,12 +34,8 @@ #include <limits> #include <string> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include "quit.h"
--- a/liboctave/oct-env.cc +++ b/liboctave/oct-env.cc @@ -47,12 +47,8 @@ #include <string> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include "file-ops.h" #include "lo-error.h"
--- a/liboctave/oct-group.cc +++ b/liboctave/oct-group.cc @@ -25,9 +25,7 @@ #include <config.h> #endif -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #ifdef HAVE_GRP_H #include <grp.h>
--- a/liboctave/oct-group.h +++ b/liboctave/oct-group.h @@ -25,9 +25,7 @@ #include <string> -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include "str-vec.h"
--- a/liboctave/oct-passwd.cc +++ b/liboctave/oct-passwd.cc @@ -24,9 +24,7 @@ #include <config.h> #endif -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #ifdef HAVE_PWD_H #include <pwd.h>
--- a/liboctave/oct-passwd.h +++ b/liboctave/oct-passwd.h @@ -25,9 +25,7 @@ #include <string> -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif class OCTAVE_API
--- a/liboctave/oct-syscalls.cc +++ b/liboctave/oct-syscalls.cc @@ -30,13 +30,8 @@ #include <string.h> -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif - -#ifdef HAVE_UNISTD_H #include <unistd.h> -#endif #ifdef HAVE_FCNTL_H #include <fcntl.h>
--- a/liboctave/oct-syscalls.h +++ b/liboctave/oct-syscalls.h @@ -28,9 +28,7 @@ class string_vector; -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif struct OCTAVE_API
--- a/liboctave/oct-time.cc +++ b/liboctave/oct-time.cc @@ -27,12 +27,8 @@ #include <climits> #include <ctime> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #if defined (OCTAVE_USE_WINDOWS_API) #define WIN32_LEAN_AND_MEAN
--- 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 <sys/types.h> -#endif #include <regex.h> #endif
--- 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 <sys/types.h> -#endif #ifdef HAVE_SYS_STAT_H #include <sys/stat.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 <sys/types.h> -#endif #include <unistd.h> -#endif #if defined (HAVE_DIRENT_H) || defined (_POSIX_VERSION) #include <dirent.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 <sys/types.h> -#endif #if defined (NeXT) && ! defined (_POSIX_SOURCE) #define HAVE_SYS_WAIT_H
--- a/liboctave/tempname.c +++ b/liboctave/tempname.c @@ -28,12 +28,8 @@ #include <stdlib.h> #include <string.h> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include <fcntl.h>
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2010-01-21 John W. Eaton <jwe@octave.org> + + * 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 <highegg@gmail.com> * ov-base.h (octave_base_value::dim_vector): Return 0x0 by default.
--- a/src/DLD-FUNCTIONS/getgrent.cc +++ b/src/DLD-FUNCTIONS/getgrent.cc @@ -27,9 +27,7 @@ #include <string> -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include "oct-group.h"
--- a/src/DLD-FUNCTIONS/getpwent.cc +++ b/src/DLD-FUNCTIONS/getpwent.cc @@ -27,9 +27,7 @@ #include <string> -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include "oct-passwd.h"
--- 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 <sys/types.h> -#endif #ifdef HAVE_SYS_RESOURCE_H #include <sys/resource.h>
--- 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 <sys/types.h> -#endif #include <regex.h> #endif
--- a/src/cutils.c +++ b/src/cutils.c @@ -35,12 +35,8 @@ #else -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include "systime.h"
--- a/src/data.cc +++ b/src/data.cc @@ -29,9 +29,7 @@ #include "systime.h" -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #ifdef HAVE_SYS_RESOURCE_H #include <sys/resource.h>
--- a/src/defaults.cc +++ b/src/defaults.cc @@ -31,12 +31,8 @@ #include <iostream> #include <string> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include "dir-ops.h" #include "oct-env.h"
--- a/src/dirfns.cc +++ b/src/dirfns.cc @@ -34,12 +34,8 @@ #include <sstream> #include <string> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include "file-ops.h" #include "file-stat.h"
--- a/src/file-io.cc +++ b/src/file-io.cc @@ -47,12 +47,8 @@ #include <stack> #include <vector> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #ifdef HAVE_ZLIB_H #include <zlib.h>
--- a/src/help.cc +++ b/src/help.cc @@ -34,12 +34,8 @@ #include <sstream> #include <string> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include "cmd-edit.h" #include "file-ops.h"
--- a/src/input.cc +++ b/src/input.cc @@ -36,12 +36,8 @@ #include <sstream> #include <string> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include "cmd-edit.h" #include "file-ops.h"
--- a/src/lex.ll +++ b/src/lex.ll @@ -47,12 +47,8 @@ #include <string> #include <stack> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include "cmd-edit.h" #include "quit.h"
--- a/src/oct-hist.cc +++ b/src/oct-hist.cc @@ -43,12 +43,8 @@ #include <fstream> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include "cmd-hist.h" #include "file-ops.h"
--- a/src/oct-procbuf.cc +++ b/src/oct-procbuf.cc @@ -29,12 +29,8 @@ #include <iostream> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include "lo-mappers.h" #include "lo-utils.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 <sys/types.h> -#endif #include "c-file-ptr-stream.h"
--- a/src/octave.cc +++ b/src/octave.cc @@ -35,12 +35,8 @@ #include <fstream> #include <iostream> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include "cmd-edit.h" #include "f77-fcn.h"
--- a/src/pager.h +++ b/src/pager.h @@ -28,9 +28,7 @@ #include <sstream> #include <string> -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif class OCTINTERP_API
--- a/src/procstream.h +++ b/src/procstream.h @@ -27,9 +27,7 @@ #include <iosfwd> #include <string> -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include "oct-procbuf.h"
--- a/src/sighandlers.cc +++ b/src/sighandlers.cc @@ -30,12 +30,8 @@ #include <iostream> #include <new> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #include "cmd-edit.h" #include "oct-syscalls.h"
--- a/src/syscalls.cc +++ b/src/syscalls.cc @@ -33,12 +33,8 @@ #include <cstdio> #include <cstring> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #ifdef HAVE_FCNTL_H #include <fcntl.h>
--- a/src/sysdep.cc +++ b/src/sysdep.cc @@ -34,12 +34,8 @@ #include <iostream> #include <string> -#ifdef HAVE_UNISTD_H -#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#endif #include <unistd.h> -#endif #if defined (HAVE_TERMIOS_H) #include <termios.h>