X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=libsysio%2Finclude%2Fsysio.h;h=c9eab42cd61aa12a1883ec39f37e10bcbab92c0d;hb=1932a135cf8cedcea2d0f2d5be21edd7fe306251;hp=bae86c20e1cf95ae51dfe90bfbea31b46c67a359;hpb=6b6514dc5f361bd3871c447e42fde55cff7d252e;p=fs%2Flustre-release.git diff --git a/libsysio/include/sysio.h b/libsysio/include/sysio.h index bae86c2..c9eab42 100644 --- a/libsysio/include/sysio.h +++ b/libsysio/include/sysio.h @@ -49,6 +49,7 @@ #include #include "sysio-cmn.h" +#include "creds.h" #if defined(_DIRENT_H) && _DIRENT_H /* @@ -77,7 +78,7 @@ * Internally, all directory entries are carried in the 64-bit capable * structure. */ -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE #define intnl_dirent dirent64 #else #define intnl_dirent dirent @@ -88,7 +89,7 @@ struct dirent; * Internally, all file status is carried in the 64-bit capable * structure. */ -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE #define intnl_stat stat64 #else #define intnl_stat stat @@ -96,7 +97,7 @@ struct dirent; struct stat; #ifdef _HAVE_STATVFS -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE #define intnl_statvfs statvfs64 #else #define intnl_statvfs statvfs @@ -122,6 +123,9 @@ extern mode_t _sysio_umask; extern int _sysio_init(void); extern void _sysio_shutdown(void); +#ifdef ZERO_SUM_MEMORY +extern void _sysio_access_shutdown(void); +#endif #if 0 struct _sysio_boot_ctl { @@ -173,13 +177,14 @@ extern int SYSIO_INTERFACE_NAME(dup2)(int oldfd, int newfd); extern int SYSIO_INTERFACE_NAME(fcntl)(int fd, int cmd, ...); extern int SYSIO_INTERFACE_NAME(fcntl64)(int fd, int cmd, ...); extern int SYSIO_INTERFACE_NAME(fstat)(int fd, struct stat *buf); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(fstat64)(int fd, struct stat64 *buf); +extern int SYSIO_INTERFACE_NAME(lstat64)(const char *path, struct stat64 *buf); #endif extern int SYSIO_INTERFACE_NAME(fsync)(int fd); extern char *SYSIO_INTERFACE_NAME(getcwd)(char *buf, size_t size); extern off_t SYSIO_INTERFACE_NAME(lseek)(int fd, off_t offset, int whence); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern off64_t SYSIO_INTERFACE_NAME(lseek64)(int fd, off64_t offset, int whence); #endif @@ -190,7 +195,7 @@ extern int SYSIO_INTERFACE_NAME(getdirentries)(int fd, char *buf, int nbytes , #else extern ssize_t SYSIO_INTERFACE_NAME(getdirentries)(int fd, char *buf, size_t nbytes, off_t *basep); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern ssize_t SYSIO_INTERFACE_NAME(getdirentries64)(int fd, char *buf, size_t nbytes, @@ -199,15 +204,15 @@ extern ssize_t SYSIO_INTERFACE_NAME(getdirentries64)(int fd, #endif extern int SYSIO_INTERFACE_NAME(mkdir)(const char *path, mode_t mode); extern int SYSIO_INTERFACE_NAME(open)(const char *path, int flag, ...); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(open64)(const char *path, int flag, ...); #endif extern int SYSIO_INTERFACE_NAME(creat)(const char *path, mode_t mode); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(creat64)(const char *path, mode_t mode); #endif extern int SYSIO_INTERFACE_NAME(stat)(const char *path, struct stat *buf); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(stat64)(const char *path, struct stat64 *buf); #endif extern ssize_t SYSIO_INTERFACE_NAME(read)(int fd, void *buf, size_t count); @@ -228,21 +233,21 @@ extern ssize_t SYSIO_INTERFACE_NAME(writev)(int fd, int count); #ifdef _HAVE_STATVFS extern int SYSIO_INTERFACE_NAME(statvfs)(const char *path, struct statvfs *buf); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(statvfs64)(const char *path, struct statvfs64 *buf); #endif extern int SYSIO_INTERFACE_NAME(fstatvfs)(int fd, struct statvfs *buf); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(fstatvfs64)(int fd, struct statvfs64 *buf); #endif #endif extern int SYSIO_INTERFACE_NAME(truncate)(const char *path, off_t length); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(truncate64)(const char *path, off64_t length); #endif extern int SYSIO_INTERFACE_NAME(ftruncate)(int fd, off_t length); -#if _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE extern int SYSIO_INTERFACE_NAME(ftruncate64)(int fd, off64_t length); #endif extern int SYSIO_INTERFACE_NAME(rmdir)(const char *path); @@ -274,11 +279,17 @@ extern int SYSIO_INTERFACE_NAME(umount)(const char *target); extern DIR *SYSIO_INTERFACE_NAME(opendir)(const char *name); extern int SYSIO_INTERFACE_NAME(closedir)(DIR *dir); extern struct dirent *SYSIO_INTERFACE_NAME(readdir)(DIR *dir); + extern int SYSIO_INTERFACE_NAME(scandir)(const char *dir, struct dirent ***namelist, int(*filter)(const struct dirent *), - int(*compar)(const void *, - const void *)); +#ifdef HAVE_POSIX2008_SCANDIR + int(*compar)(const struct dirent **, + const struct dirent **) +#else + int(*compar)(const void *, const void *) +#endif + ); #if defined(_BSD_SOURCE) || defined(_SVID_SOURCE) extern ssize_t SYSIO_INTERFACE_NAME(getdirentries)(int fd, char *buf,