CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_1/src/Utilities/RFIOAdaptor/interface/RFIO.h

Go to the documentation of this file.
00001 #ifndef RFIO_ADAPTOR_RFIO_H
00002 # define RFIO_ADAPTOR_RFIO_H
00003 
00004 # include <sys/stat.h>
00005 # include <sys/uio.h>
00006 # include <unistd.h>
00007 # include <fcntl.h>
00008 
00009 # define RFIO_READOPT 1
00010 # define serrno (*C__serrno())
00011 # define rfio_errno (*C__rfio_errno())
00012 #ifdef __APPLE__
00013 typedef off_t off64_t;
00014 #endif
00015 
00016 extern "C"
00017 {
00018   // This is a RFIO-special structure like the "iovec" one
00019   // in sys/uio.h, but this doesn't actually exist on the system.
00020   struct iovec64
00021   {
00022     off64_t iov_base;
00023     int     iov_len;
00024   };
00025 
00026   int     rfio_preseek64(int, struct iovec64 *, int);
00027   int     rfio_open64(const char *filepath, int flags, int mode);
00028   int     rfio_close(int s);
00029   int     rfio_close64(int s) { return  rfio_close(s);}
00030   int     rfio_read64(int s, void *ptr, int size);
00031   int     rfio_write64(int s, const void *ptr, int size);
00032   off64_t rfio_lseek64(int s, off64_t  offset, int how);
00033   int     rfio_access(const char *filepath, int mode);
00034   int     rfio_unlink(const char *filepath);
00035   int     rfio_parse(const char *name, char **host, char **path);
00036   int     rfio_stat64(const char *path, struct stat *statbuf);
00037   int     rfio_fstat64(int s, struct stat *statbuf);
00038   void    rfio_perror(const char *msg);
00039   char *  rfio_serror();
00040   int     rfioreadopt(int opt);
00041   int     rfiosetopt(int opt, int *pval, int len);
00042   int     rfio_mkdir(const char *path, int mode);
00043   void *  rfio_opendir(const char *dirpath);
00044   int     rfio_closedir(void *dirp);
00045   void *  rfio_readdir(void *dirp);
00046 
00047   int     Cthread_init(void);
00048   int *   C__rfio_errno(void);
00049   int *   C__serrno(void);
00050 }
00051 
00052 #endif // RFIO_ADAPTOR_RFIO_H