libg722_1
0.0.1
|
00001 /* lt__dirent.h -- internal directory entry scanning interface 00002 00003 Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc. 00004 Written by Bob Friesenhahn, 2001 00005 00006 NOTE: The canonical source of this file is maintained with the 00007 GNU Libtool package. Report bugs to bug-libtool@gnu.org. 00008 00009 GNU Libltdl is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Lesser General Public 00011 License as published by the Free Software Foundation; either 00012 version 2 of the License, or (at your option) any later version. 00013 00014 As a special exception to the GNU Lesser General Public License, 00015 if you distribute this file as part of a program or library that 00016 is built using GNU Libtool, you may include this file under the 00017 same distribution terms that you use for the rest of that program. 00018 00019 GNU Libltdl is distributed in the hope that it will be useful, 00020 but WITHOUT ANY WARRANTY; without even the implied warranty of 00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00022 GNU Lesser General Public License for more details. 00023 00024 You should have received a copy of the GNU Lesser General Public 00025 License along with GNU Libltdl; see the file COPYING.LIB. If not, a 00026 copy can be downloaded from http://www.gnu.org/licenses/lgpl.html, 00027 or obtained by writing to the Free Software Foundation, Inc., 00028 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00029 */ 00030 00031 #if !defined(LT__DIRENT_H) 00032 #define LT__DIRENT_H 1 00033 00034 #if defined(LT_CONFIG_H) 00035 # include LT_CONFIG_H 00036 #else 00037 # include <config.h> 00038 #endif 00039 00040 #include "lt_system.h" 00041 00042 #ifdef HAVE_DIRENT_H 00043 /* We have a fully operational dirent subsystem. */ 00044 # include <dirent.h> 00045 # define D_NAMLEN(dirent) (strlen((dirent)->d_name)) 00046 00047 #elif defined __WINDOWS__ 00048 /* Use some wrapper code to emulate dirent on windows.. */ 00049 # define WINDOWS_DIRENT_EMULATION 1 00050 00051 # include <windows.h> 00052 00053 # define D_NAMLEN(dirent) (strlen((dirent)->d_name)) 00054 # define dirent lt__dirent 00055 # define DIR lt__DIR 00056 # define opendir lt__opendir 00057 # define readdir lt__readdir 00058 # define closedir lt__closedir 00059 00060 LT_BEGIN_C_DECLS 00061 00062 struct dirent 00063 { 00064 char d_name[LT_FILENAME_MAX]; 00065 int d_namlen; 00066 }; 00067 00068 typedef struct 00069 { 00070 HANDLE hSearch; 00071 WIN32_FIND_DATA Win32FindData; 00072 BOOL firsttime; 00073 struct dirent file_info; 00074 } DIR; 00075 00076 00077 LT_SCOPE DIR * opendir (const char *path); 00078 LT_SCOPE struct dirent *readdir (DIR *entry); 00079 LT_SCOPE void closedir (DIR *entry); 00080 00081 LT_END_C_DECLS 00082 00083 #else /* !defined(__WINDOWS__)*/ 00084 ERROR - cannot find dirent 00085 #endif /*!defined(__WINDOWS__)*/ 00086 00087 #endif /*!defined(LT__DIRENT_H)*/