"Fossies" - the Fresh Open Source Software Archive

Member "cook-2.34/common/ac/dirent.h" (25 Sep 2010, 1347 Bytes) of package /linux/misc/old/cook-2.34.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "dirent.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2  *      cook - file construction tool
    3  *      Copyright (C) 1994, 1997-1999, 2006-2008 Peter Miller
    4  *
    5  *      This program is free software; you can redistribute it and/or modify
    6  *      it under the terms of the GNU General Public License as published by
    7  *      the Free Software Foundation; either version 3 of the License, or
    8  *      (at your option) any later version.
    9  *
   10  *      This program is distributed in the hope that it will be useful,
   11  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
   12  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13  *      GNU General Public License for more details.
   14  *
   15  *      You should have received a copy of the GNU General Public License
   16  *      along with this program. If not, see
   17  *      <http://www.gnu.org/licenses/>.
   18  */
   19 
   20 #ifndef COMMON_AC_DIRENT_H
   21 #define COMMON_AC_DIRENT_H
   22 
   23 #include <common/config.h>
   24 
   25 #ifdef HAVE_DIRENT_H
   26 #include <sys/types.h>
   27 #include <dirent.h>
   28 #define NLENGTH(dirent) (strlen((dirent)->d_name))
   29 #else /* not dirent.h */
   30 #define dirent direct
   31 #define NLENGTH(dirent) ((dirent)->d_namlen)
   32 #ifdef HAVE_SYS_NDIR_H
   33 #include <sys/ndir.h>
   34 #endif /* SYSNDIR */
   35 #ifdef HAVE_SYS_DIR_H
   36 #include <sys/dir.h>
   37 #endif /* SYSDIR */
   38 #ifdef HAVE_NDIR_H
   39 #include <ndir.h>
   40 #endif /* NDIR */
   41 #endif /* not dirent.h */
   42 
   43 #endif /* COMMON_AC_DIRENT_H */