pike.git / src / modules / _Stdio / efuns.c

version» Context lines:

pike.git/src/modules/_Stdio/efuns.c:59:      #define sp Pike_sp      /* #define DEBUG_FILE */   /* #define READDIR_DEBUG */      #ifdef __NT__      #include <winbase.h>   #include <io.h> + #include <direct.h>      /* Old versions of the headerfiles don't have this constant... */   #ifndef INVALID_SET_FILE_POINTER   #define INVALID_SET_FILE_POINTER ((DWORD)-1)   #endif      /* Dynamic load of functions that doesn't exist in all Windows versions. */      static HINSTANCE kernel32lib;   
pike.git/src/modules/_Stdio/efuns.c:1869:    *!    *! @seealso    *! @[Stdio.File->errno()], @[strerror()]    */   static void f_errno(INT32 args)   {    pop_n_elems(args);    push_int(errno);   }    + #ifdef HAVE__ACCESS + #define access(PATH, FLAGS) _access(PATH, FLAGS) + #define HAVE_ACCESS + #endif    - #if defined(HAVE_ACCESS) + #ifdef HAVE_ACCESS +  + #ifndef R_OK + #define R_OK 4 + #define W_OK 2 + #define X_OK 1 + #define F_OK 0 + #endif +    /*! @decl int access( string path, string|void mode )    *!    *! access() checks if the calling process can access the file    *! @[path]. Symbolic links are dereferenced.    *!    *! @param mode    *! The @[mode] specifies the accessibility checks to be performed, and    *! is either not specified or empty, in which case access() just tests    *! if the file exists, or one or more of the characters @expr{"rwx"@}.    *!
pike.git/src/modules/_Stdio/efuns.c:1966: Inside #if defined(HAVE_ACCESS)
      THREADS_ALLOW_UID();    do {    res = access( path, flags );    } while( (res == -1) && (errno == EINTR) )    THREADS_DISALLOW_UID();       pop_n_elems(args);    push_int( !res );   } - #endif + #endif /* HAVE_ACCESS */      void init_stdio_efuns(void)   {    set_close_on_exec(0,1);    set_close_on_exec(1,1);    set_close_on_exec(2,1);      #if 0   #ifdef HAVE_LIBZFS_INIT    libzfs_handle = libzfs_init();