Mercurial > octave
changeset 21863:a25110491607
eliminate obsolete sysdir.h header file
* sysdir.h: Delete. We can assume gnulib's <dirent.h> is available.
* liboctave/system/module.mk: Update.
* dir-ops.cc, kpse.cc: Include <dirent.h> instead of "sysdir.h".
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 10 Jun 2016 16:38:26 -0400 |
parents | 5c67b16acc4a |
children | f3487b21e879 |
files | liboctave/system/dir-ops.cc liboctave/system/module.mk liboctave/system/sysdir.h liboctave/util/kpse.cc |
diffstat | 4 files changed, 3 insertions(+), 56 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/system/dir-ops.cc Sat Jun 11 15:32:31 2016 -0700 +++ b/liboctave/system/dir-ops.cc Fri Jun 10 16:38:26 2016 -0400 @@ -31,7 +31,7 @@ #include <list> #include <string> -#include "sysdir.h" +#include <dirent.h> #include "dir-ops.h" #include "file-ops.h"
--- a/liboctave/system/module.mk Sat Jun 11 15:32:31 2016 -0700 +++ b/liboctave/system/module.mk Fri Jun 10 16:38:26 2016 -0400 @@ -13,7 +13,6 @@ NOINSTALL_SYSTEM_INC = \ liboctave/system/pathlen.h \ - liboctave/system/sysdir.h \ liboctave/system/syswait.h SYSTEM_SRC = \
--- a/liboctave/system/sysdir.h Sat Jun 11 15:32:31 2016 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* - -Copyright (C) 1995-2015 John W. Eaton - -This file is part of Octave. - -Octave is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -Octave is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -for more details. - -You should have received a copy of the GNU General Public License -along with Octave; see the file COPYING. If not, see -<http://www.gnu.org/licenses/>. - -*/ - -#if ! defined (octave_sysdir_h) -#define octave_sysdir_h 1 - -#include "octave-config.h" - -// This mess suggested by the autoconf manual. - -// unistd.h defines _POSIX_VERSION on POSIX.1 systems. - -#include <sys/types.h> -#include <unistd.h> - -#if defined (HAVE_DIRENT_H) || defined (_POSIX_VERSION) -# include <dirent.h> -# define NLENGTH(dirent) (strlen((dirent)->d_name)) -#else -# define dirent direct -# define NLENGTH(dirent) ((dirent)->d_namlen) -# if defined (HAVE_SYS_NDIR_H) -# include <sys/ndir.h> -# endif -# if defined (HAVE_SYS_DIR_H) -# include <sys/dir.h> -# endif -# if defined (HAVE_NDIR_H) -# include <ndir.h> -# endif -#endif - -#endif
--- a/liboctave/util/kpse.cc Sat Jun 11 15:32:31 2016 -0700 +++ b/liboctave/util/kpse.cc Fri Jun 10 16:38:26 2016 -0400 @@ -51,7 +51,6 @@ #if defined (__MINGW32__) #include <windows.h> #include <fcntl.h> -#include <dirent.h> #elif defined (WIN32) #if ! defined (_MSC_VER) #define __STDC__ 1 @@ -140,7 +139,8 @@ #include <sys/types.h> #include <unistd.h> -#include "sysdir.h" +#include <dirent.h> + #include "statdefs.h" /* define NAME_MAX, the maximum length of a single