Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath
Commits
f9d156ba
Commit
f9d156ba
authored
Aug 30, 2013
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use a table include to dramatically simplify longpath.h (more simplification TO DO)
parent
febcd87a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
122 additions
and
234 deletions
+122
-234
longpath.h
src/include/longpath/longpath.h
+6
-234
longpath_tbl_functions.h
src/include/longpath/longpath_tbl_functions.h
+116
-0
No files found.
src/include/longpath/longpath.h
View file @
f9d156ba
...
...
@@ -226,241 +226,13 @@ extern "C" {
#endif
/* _LP64 && _LARGEFILE64_SOURCE */
#if defined(__STDC__)
extern
int
openl
(
const
char
*
,
int
,
...);
extern
int
creatl
(
const
char
*
,
mode_t
);
extern
int
statl
(
const
char
*
,
struct
stat
*
);
extern
int
linkl
(
const
char
*
,
const
char
*
);
extern
int
unlinkl
(
const
char
*
);
extern
int
chownl
(
const
char
*
,
uid_t
,
gid_t
);
extern
int
chmodl
(
const
char
*
,
mode_t
);
extern
int
mknodl
(
const
char
*
,
mode_t
,
dev_t
);
extern
int
mkfifol
(
const
char
*
,
mode_t
);
extern
int
rmdirl
(
const
char
*
);
extern
int
mkdirl
(
const
char
*
,
mode_t
);
extern
int
renamel
(
const
char
*
,
const
char
*
);
extern
int
utimesl
(
const
char
*
,
const
struct
timeval
*
);
extern
int
lutimesl
(
const
char
*
,
const
struct
timeval
*
);
extern
int
utimel
(
const
char
*
,
const
struct
utimbuf
*
);
/* at funcs */
#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
defined(_ATFILE_SOURCE)
extern
int
openatl
(
int
,
const
char
*
,
int
,
...);
#ifdef HAVE_ATTROPEN
extern
int
attropenl
(
const
char
*
,
const
char
*
,
int
,
...);
#endif
extern
int
fstatatl
(
int
,
const
char
*
,
struct
stat
*
,
int
);
#if defined(HAVE_LINKAT)
extern
int
linkatl
(
int
,
const
char
*
,
int
,
const
char
*
,
int
);
#endif
extern
int
unlinkatl
(
int
,
const
char
*
,
int
);
#if defined(HAVE_SYMLINKAT)
extern
int
symlinkatl
(
const
char
*
,
int
,
const
char
*
);
#endif
#if defined(HAVE_READLINKAT)
extern
int
readlinkatl
(
int
,
const
char
*
,
char
*
,
size_t
);
#endif
extern
int
fchownatl
(
int
,
const
char
*
,
uid_t
,
gid_t
,
int
);
#if defined(HAVE_MKNODAT)
extern
int
mknodatl
(
int
,
const
char
*
,
mode_t
,
dev_t
);
#endif
#if defined(HAVE_MKFIFOAT)
extern
int
mkfifoatl
(
int
,
const
char
*
,
mode_t
);
#endif
extern
int
rmdiratl
(
int
,
const
char
*
);
#if defined(HAVE_MKDIRAT)
extern
int
mkdiratl
(
int
,
const
char
*
,
mode_t
);
#endif
extern
int
renameatl
(
int
,
const
char
*
,
int
,
const
char
*
);
#endif
/* times at */
#if defined(__EXTENSIONS__) || \
(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
/* || defined(_XPG7) */
extern
int
futimesatl
(
int
,
const
char
*
,
const
struct
timeval
*
);
extern
int
utimensatl
(
int
,
const
char
*
,
const
struct
timespec
*
,
int
);
#endif
/* lstat */
#if !defined(__XOPEN_OR_POSIX) || defined(_XPG_2) || defined(__EXTENSIONS__)
extern
int
lstatl
(
const
char
*
,
struct
stat
*
);
extern
int
symlinkl
(
const
char
*
,
const
char
*
);
extern
int
readlinkl
(
const
char
*
,
char
*
,
size_t
);
extern
int
lchownl
(
const
char
*
,
uid_t
,
gid_t
);
#endif
/* mkstemp */
extern
char
*
mktempl
(
char
*
);
extern
char
*
mkdtempl
(
char
*
);
extern
int
mkstempl
(
char
*
);
extern
int
mkstempsl
(
char
*
,
int
);
/* mkstemp GNU */
#if defined(_GNU_SOURCE)
extern
int
mkostempl
(
char
*
,
int
);
extern
int
mkostempsl
(
char
*
,
int
,
int
);
#endif
DIR
*
opendirl
(
const
char
*
);
/* linux */
#ifdef HAVE_FGETXATTR
extern
ssize_t
getxattrl
(
const
char
*
,
const
char
*
,
void
*
,
size_t
);
extern
ssize_t
lgetxattrl
(
const
char
*
,
const
char
*
,
void
*
,
size_t
);
extern
int
setxattrl
(
const
char
*
,
const
char
*
,
const
void
*
,
size_t
,
int
);
extern
int
lsetxattrl
(
const
char
*
,
const
char
*
,
const
void
*
,
size_t
,
int
);
#endif
/* 64 */
#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
!defined(__PRAGMA_REDEFINE_EXTNAME))
extern
int
openl64
(
const
char
*
,
int
,
...);
extern
int
creatl64
(
const
char
*
,
mode_t
);
extern
int
statl64
(
const
char
*
,
struct
stat64
*
);
/* 64 at funcs */
#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
defined(_ATFILE_SOURCE)
extern
int
openatl64
(
int
,
const
char
*
,
int
,
...);
#ifdef HAVE_ATTROPEN
extern
int
attropenl64
(
const
char
*
,
const
char
*
,
int
,
...);
#endif
extern
int
fstatatl64
(
int
,
const
char
*
,
struct
stat64
*
,
int
);
#endif
/* 64 lstat */
#if !defined(__XOPEN_OR_POSIX) || defined(_XPG_2) || defined(__EXTENSIONS__)
extern
int
lstatl64
(
const
char
*
,
struct
stat64
*
);
#endif
/* 64 mkstemp*/
extern
int
mkstempl64
(
char
*
);
extern
int
mkstempsl64
(
char
*
,
int
);
/* 64 mkstemp GNU*/
#if defined(_GNU_SOURCE)
extern
int
mkostempl64
(
char
*
,
int
);
extern
int
mkostempsl64
(
char
*
,
int
,
int
);
#endif
#endif
/* 64 */
#define FUNCTION(type, name, bits, ...) extern type name ## l ## bits (__VA_ARGS__);
#include "longpath_tbl_functions.h"
#undef FUNCTION
#else
/* defined(__STDC__) */
extern
int
openl
();
extern
int
creatl
();
extern
int
statl
();
extern
int
linkl
();
extern
int
unlinkl
();
extern
int
chownl
();
extern
int
chmodl
();
extern
int
mknodl
();
extern
int
mkfifol
();
extern
int
rmdirl
();
extern
int
mkdirl
();
extern
int
renamel
();
extern
int
utimesl
();
extern
int
lutimesl
();
extern
int
utimel
();
/* at funcs */
#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
defined(_ATFILE_SOURCE)
extern
int
openatl
();
#ifdef HAVE_ATTROPEN
extern
int
attropenl
();
#endif
extern
int
fstatatl
();
#if defined(HAVE_LINKAT)
extern
int
linkatl
();
#endif
extern
int
unlinkatl
();
#if defined(HAVE_SYMLINKAT)
extern
int
symlinkatl
();
#endif
#if defined(HAVE_READLINKAT)
extern
int
readlinkatl
();
#endif
extern
int
fchownatl
();
#if defined(HAVE_MKNODAT)
extern
int
mknodatl
();
#endif
#if defined(HAVE_MKFIFOAT)
extern
int
mkfifoatl
();
#endif
extern
int
rmdiratl
();
#if defined(HAVE_MKDIRAT)
extern
int
mkdiratl
();
#endif
extern
int
renameatl
();
#endif
/* times at */
#if defined(__EXTENSIONS__) || \
(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
/* || defined(_XPG7) */
extern
int
futimesatl
();
extern
int
utimensatl
();
#endif
/* lstat */
#if !defined(__XOPEN_OR_POSIX) || defined(_XPG_2) || defined(__EXTENSIONS__)
extern
int
lstatl
();
extern
int
symlinkl
();
extern
int
readlinkl
();
extern
int
lchownl
();
#endif
/* mkstemp */
extern
char
*
mktempl
();
extern
char
*
mkdtempl
();
extern
int
mkstempl
();
extern
int
mkstempsl
();
/* mkstemp GNU */
#if defined(_GNU_SOURCE)
extern
int
mkostempl
();
extern
int
mkostempsl
();
#endif
DIR
*
opendirl
();
#ifdef HAVE_FGETXATTR
extern
ssize_t
getxattrl
();
extern
ssize_t
lgetxattrl
();
extern
int
setxattrl
();
extern
int
lsetxattrl
();
#endif
/* 64 */
#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
!defined(__PRAGMA_REDEFINE_EXTNAME))
extern
int
openl64
();
extern
int
creatl64
();
extern
int
statl64
();
/* 64 at funcs */
#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
defined(_ATFILE_SOURCE)
extern
int
openatl64
();
#ifdef HAVE_ATTROPEN
extern
int
attropenl64
();
#endif
extern
int
fstatatl64
();
#endif
/* 64 lstat */
#if !defined(__XOPEN_OR_POSIX) || defined(_XPG_2) || defined(__EXTENSIONS__)
extern
int
lstatl64
();
#endif
/* 64 mkstemp*/
extern
int
mkstempl64
();
extern
int
mkstempsl64
();
/* 64 mkstemp GNU*/
#if defined(_GNU_SOURCE)
extern
int
mkostempl64
();
extern
int
mkostempsl64
();
#endif
#endif
/* 64 */
#define FUNCTION(type, name, bits, ...) extern type name ## l ## bits ();
#include "longpath_tbl_functions.h"
#undef FUNCTION
#endif
/* defined(__STDC__) */
...
...
src/include/longpath/longpath_tbl_functions.h
0 → 100644
View file @
f9d156ba
FUNCTION
(
int
,
open
,
/*32*/
,
const
char
*
,
int
,
...)
FUNCTION
(
int
,
creat
,
/*32*/
,
const
char
*
,
mode_t
)
FUNCTION
(
int
,
stat
,
/*32*/
,
const
char
*
,
struct
stat
*
)
FUNCTION
(
int
,
link
,
/*32*/
,
const
char
*
,
const
char
*
)
FUNCTION
(
int
,
unlink
,
/*32*/
,
const
char
*
)
FUNCTION
(
int
,
chown
,
/*32*/
,
const
char
*
,
uid_t
,
gid_t
)
FUNCTION
(
int
,
chmod
,
/*32*/
,
const
char
*
,
mode_t
)
FUNCTION
(
int
,
mknod
,
/*32*/
,
const
char
*
,
mode_t
,
dev_t
)
FUNCTION
(
int
,
mkfifo
,
/*32*/
,
const
char
*
,
mode_t
)
FUNCTION
(
int
,
rmdir
,
/*32*/
,
const
char
*
)
FUNCTION
(
int
,
mkdir
,
/*32*/
,
const
char
*
,
mode_t
)
FUNCTION
(
int
,
rename
,
/*32*/
,
const
char
*
,
const
char
*
)
FUNCTION
(
int
,
utimes
,
/*32*/
,
const
char
*
,
const
struct
timeval
*
)
FUNCTION
(
int
,
lutimes
,
/*32*/
,
const
char
*
,
const
struct
timeval
*
)
FUNCTION
(
int
,
utime
,
/*32*/
,
const
char
*
,
const
struct
utimbuf
*
)
/* at funcs */
#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
defined(_ATFILE_SOURCE)
FUNCTION
(
int
,
openat
,
/*32*/
,
int
,
const
char
*
,
int
,
...)
#ifdef HAVE_ATTROPEN
FUNCTION
(
int
,
attropen
,
/*32*/
,
const
char
*
,
const
char
*
,
int
,
...)
#endif
FUNCTION
(
int
,
fstatat
,
/*32*/
,
int
,
const
char
*
,
struct
stat
*
,
int
)
#if defined(HAVE_LINKAT)
FUNCTION
(
int
,
linkat
,
/*32*/
,
int
,
const
char
*
,
int
,
const
char
*
,
int
)
#endif
FUNCTION
(
int
,
unlinkat
,
/*32*/
,
int
,
const
char
*
,
int
)
#if defined(HAVE_SYMLINKAT)
FUNCTION
(
int
,
symlinkat
,
/*32*/
,
const
char
*
,
int
,
const
char
*
)
#endif
#if defined(HAVE_READLINKAT)
FUNCTION
(
int
,
readlinkat
,
/*32*/
,
int
,
const
char
*
,
char
*
,
size_t
)
#endif
FUNCTION
(
int
,
fchownat
,
/*32*/
,
int
,
const
char
*
,
uid_t
,
gid_t
,
int
)
#if defined(HAVE_MKNODAT)
FUNCTION
(
int
,
mknodat
,
/*32*/
,
int
,
const
char
*
,
mode_t
,
dev_t
)
#endif
#if defined(HAVE_MKFIFOAT)
FUNCTION
(
int
,
mkfifoat
,
/*32*/
,
int
,
const
char
*
,
mode_t
)
#endif
FUNCTION
(
int
,
rmdirat
,
/*32*/
,
int
,
const
char
*
)
#if defined(HAVE_MKDIRAT)
FUNCTION
(
int
,
mkdirat
,
/*32*/
,
int
,
const
char
*
,
mode_t
)
#endif
FUNCTION
(
int
,
renameat
,
/*32*/
,
int
,
const
char
*
,
int
,
const
char
*
)
#endif
/* times at */
#if defined(__EXTENSIONS__) || \
(!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
/* || defined(_XPG7) */
FUNCTION
(
int
,
futimesat
,
/*32*/
,
int
,
const
char
*
,
const
struct
timeval
*
)
FUNCTION
(
int
,
utimensat
,
/*32*/
,
int
,
const
char
*
,
const
struct
timespec
*
,
int
)
#endif
/* lstat */
#if !defined(__XOPEN_OR_POSIX) || defined(_XPG_2) || defined(__EXTENSIONS__)
FUNCTION
(
int
,
lstat
,
/*32*/
,
const
char
*
,
struct
stat
*
)
FUNCTION
(
int
,
symlink
,
/*32*/
,
const
char
*
,
const
char
*
)
FUNCTION
(
int
,
readlink
,
/*32*/
,
const
char
*
,
char
*
,
size_t
)
FUNCTION
(
int
,
lchown
,
/*32*/
,
const
char
*
,
uid_t
,
gid_t
)
#endif
/* mkstemp */
FUNCTION
(
char
*
,
mktemp
,
/*32*/
,
char
*
)
FUNCTION
(
char
*
,
mkdtemp
,
/*32*/
,
char
*
)
FUNCTION
(
int
,
mkstemp
,
/*32*/
,
char
*
)
FUNCTION
(
int
,
mkstemps
,
/*32*/
,
char
*
,
int
)
/* mkstemp GNU */
#if defined(_GNU_SOURCE)
FUNCTION
(
int
,
mkostemp
,
/*32*/
,
char
*
,
int
)
FUNCTION
(
int
,
mkostemps
,
/*32*/
,
char
*
,
int
,
int
)
#endif
FUNCTION
(
DIR
*
,
opendir
,
/*32*/
,
const
char
*
)
/* linux */
#ifdef HAVE_FGETXATTR
FUNCTION
(
ssize_t
,
getxattr
,
/*32*/
,
const
char
*
,
const
char
*
,
void
*
,
size_t
)
FUNCTION
(
ssize_t
,
lgetxattr
,
/*32*/
,
const
char
*
,
const
char
*
,
void
*
,
size_t
)
FUNCTION
(
int
,
setxattr
,
/*32*/
,
const
char
*
,
const
char
*
,
const
void
*
,
size_t
,
int
)
FUNCTION
(
int
,
lsetxattr
,
/*32*/
,
const
char
*
,
const
char
*
,
const
void
*
,
size_t
,
int
)
#endif
/* 64 */
#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
!defined(__PRAGMA_REDEFINE_EXTNAME))
FUNCTION
(
int
,
open
,
64
,
const
char
*
,
int
,
...)
FUNCTION
(
int
,
creat
,
64
,
const
char
*
,
mode_t
)
FUNCTION
(
int
,
stat
,
64
,
const
char
*
,
struct
stat64
*
)
/* 64 at funcs */
#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \
defined(_ATFILE_SOURCE)
FUNCTION
(
int
,
openat
,
64
,
int
,
const
char
*
,
int
,
...)
#ifdef HAVE_ATTROPEN
FUNCTION
(
int
,
attropen
,
64
,
const
char
*
,
const
char
*
,
int
,
...)
#endif
FUNCTION
(
int
,
fstatat
,
64
,
int
,
const
char
*
,
struct
stat64
*
,
int
)
#endif
/* 64 lstat */
#if !defined(__XOPEN_OR_POSIX) || defined(_XPG_2) || defined(__EXTENSIONS__)
FUNCTION
(
int
,
lstat
,
64
,
const
char
*
,
struct
stat64
*
)
#endif
/* 64 mkstemp*/
FUNCTION
(
int
,
mkstemp
,
64
,
char
*
)
FUNCTION
(
int
,
mkstemps
,
64
,
char
*
,
int
)
/* 64 mkstemp GNU*/
#if defined(_GNU_SOURCE)
FUNCTION
(
int
,
mkostemp
,
64
,
char
*
,
int
)
FUNCTION
(
int
,
mkostemps
,
64
,
char
*
,
int
,
int
)
#endif
#endif
/* 64 */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment