# HG changeset patch # User John W. Eaton # Date 1261804021 18000 # Node ID 3b2f81d5a6dcefa419a1b88b566871dc9454145f # Parent 52a248732bb611f1f04ad859b34c8230dbcf403d use gnulib modules for fstat, lstat, and stat diff -r 52a248732bb6 -r 3b2f81d5a6dc ChangeLog --- a/ChangeLog Fri Dec 25 23:58:08 2009 -0500 +++ b/ChangeLog Sat Dec 26 00:07:01 2009 -0500 @@ -1,3 +1,9 @@ +2009-12-26 John W. Eaton + + * bootstrap.conf (gnulib_modules): Include fstat, lstat, and + stat in the list. + * configure.ac: Don't check for fstat, lstat, or stat. + 2009-12-25 John W. Eaton * bootstrap.conf (gnulib_modules): Include mkdir in the list. diff -r 52a248732bb6 -r 3b2f81d5a6dc bootstrap.conf --- a/bootstrap.conf Fri Dec 25 23:58:08 2009 -0500 +++ b/bootstrap.conf Sat Dec 26 00:07:01 2009 -0500 @@ -20,8 +20,11 @@ gnulib_modules=" crypto/md5 fnmatch + fstat glob + lstat mkdir + stat strftime " diff -r 52a248732bb6 -r 3b2f81d5a6dc configure.ac --- a/configure.ac Fri Dec 25 23:58:08 2009 -0500 +++ b/configure.ac Sat Dec 26 00:07:01 2009 -0500 @@ -1431,14 +1431,14 @@ ### Checks for functions and variables. AC_CHECK_FUNCS(atexit basename bcopy bzero canonicalize_file_name \ - chmod dup2 endgrent endpwent execvp expm1 expm1f fcntl fork fstat getcwd \ + chmod dup2 endgrent endpwent execvp expm1 expm1f fcntl fork getcwd \ getegid geteuid getgid getgrent getgrgid getgrnam getpgrp getpid \ getppid getpwent getpwuid gettimeofday getuid getwd _kbhit kill \ - lgamma lgammaf lgamma_r lgammaf_r link localtime_r log1p log1pf lstat \ + lgamma lgammaf lgamma_r lgammaf_r link localtime_r log1p log1pf \ memmove mkstemp on_exit pipe poll putenv raise readlink \ realpath rename resolvepath rindex rmdir roundl select setgrent setlocale \ setpwent setvbuf sigaction siglongjmp sigpending sigprocmask sigsuspend \ - snprintf stat strcasecmp strdup strerror stricmp strncasecmp \ + snprintf strcasecmp strdup strerror stricmp strncasecmp \ strnicmp strptime strsignal symlink tempnam tgammaf trunc umask \ uname unlink usleep utime vfprintf vsprintf vsnprintf waitpid \ _chmod _snprintf x_utime _utime32) diff -r 52a248732bb6 -r 3b2f81d5a6dc liboctave/ChangeLog --- a/liboctave/ChangeLog Fri Dec 25 23:58:08 2009 -0500 +++ b/liboctave/ChangeLog Sat Dec 26 00:07:01 2009 -0500 @@ -1,3 +1,8 @@ +2009-12-26 John W. Eaton + + * file-stat.cc (lstat): Delete replacement function. + (file_fstat::update_internal): Assume fstat is available. + 2009-12-25 John W. Eaton * file-ops.cc (file_ops::mkdir): Assume we have an mkdir diff -r 52a248732bb6 -r 3b2f81d5a6dc liboctave/file-stat.cc --- a/liboctave/file-stat.cc Fri Dec 25 23:58:08 2009 -0500 +++ b/liboctave/file-stat.cc Sat Dec 26 00:07:01 2009 -0500 @@ -39,14 +39,6 @@ #include "file-stat.h" #include "statdefs.h" -#if !defined (HAVE_LSTAT) -static inline int -lstat (const char *name, struct stat *buf) -{ - return stat (name, buf); -} -#endif - // FIXME -- the is_* and mode_as_string functions are only valid // for initialized objects. If called for an object that is not // initialized, they should throw an exception. @@ -259,8 +251,6 @@ initialized = false; fail = false; -#if defined (HAVE_FSTAT) - struct stat buf; int status = fstat (fid, &buf); @@ -298,13 +288,6 @@ #endif } -#else - - fail = true; - errmsg = "fstat not available on this system"; - -#endif - initialized = true; } }