Changeset 1117 for Whitix

Show
Ignore:
Timestamp:
10/14/08 18:36:11 (1 month ago)
Author:
mwhitworth
Message:

Add fields to glob, add defines.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • Whitix/branches/keobject/user/posix/include/glob.h

    r721 r1117  
    1 #ifndef GLOB_H 
    2 #define GLOB_H 
     1#ifndef _POSIX_GLOB_H 
     2#define _POSIX_GLOB_H 
    33 
     4#include <sys/stat.h> 
    45#include <unistd.h> 
    56 
     
    910        char** gl_pathv; 
    1011        size_t gl_offs; 
     12 
     13        /* GNU extensions. Use an ifdef one day? */ 
     14        void (*gl_closedir)(void*); 
     15        struct dirent* (*gl_readdir)(void*); 
     16        void* (*gl_opendir)(const char*); 
     17        int (*gl_lstat)(const char*, struct stat*); 
     18        int (*gl_stat)(const char*, struct stat*); 
    1119}glob_t; 
    1220 
     
    1422void globfree(glob_t*); 
    1523 
     24#define __ptr_t         void* 
     25 
     26/* Flags */ 
     27#define GLOB_APPEND                     0x01 
     28#define GLOB_DOOFFS                     0x02 
     29#define GLOB_ERR                        0x04 
     30#define GLOB_MARK                       0x08 
     31#define GLOB_NOCHECK            0x10 
     32#define GLOB_NOESCAPE           0x20 
     33#define GLOB_NOSORT                     0x40 
     34 
     35/* Flags - GNU extensions */ 
     36#define GLOB_MAGCHAR            0x80 
     37#define GLOB_ALTDIRFUNC         0x100 
     38 
     39#define _GLOB_FLAGS             (0x1FF) 
     40 
     41/* Errors */ 
     42#define GLOB_ABORTED            0x01 
     43#define GLOB_NOMATCH            0x02 
     44#define GLOB_NOSPACE            0x03 
     45#define GLOB_NOSYS                      0x04 
     46 
    1647#endif