1354
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
1354
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
5307
|
19 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
20 02110-1301, USA. |
1354
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_sysdir_h) |
|
25 #define octave_sysdir_h 1 |
|
26 |
|
27 // This mess suggested by the autoconf manual. |
|
28 |
|
29 // unistd.h defines _POSIX_VERSION on POSIX.1 systems. |
|
30 |
|
31 #ifdef HAVE_UNISTD_H |
2443
|
32 #ifdef HAVE_SYS_TYPES_H |
1354
|
33 #include <sys/types.h> |
2443
|
34 #endif |
1354
|
35 #include <unistd.h> |
|
36 #endif |
|
37 |
|
38 #if defined (HAVE_DIRENT_H) || defined (_POSIX_VERSION) |
|
39 #include <dirent.h> |
|
40 #define NLENGTH(dirent) (strlen((dirent)->d_name)) |
|
41 #else |
|
42 #define dirent direct |
|
43 #define NLENGTH(dirent) ((dirent)->d_namlen) |
|
44 #if defined (HAVE_SYS_NDIR_H) |
|
45 #include <sys/ndir.h> |
|
46 #endif |
|
47 #if defined (HAVE_SYS_DIR_H) |
|
48 #include <sys/dir.h> |
|
49 #endif |
|
50 #if defined (HAVE_NDIR_H) |
|
51 #include <ndir.h> |
|
52 #endif |
|
53 #endif |
|
54 |
|
55 #endif |
|
56 |
|
57 /* |
|
58 ;;; Local Variables: *** |
|
59 ;;; mode: C++ *** |
|
60 ;;; End: *** |
|
61 */ |