Changeset ef84413 in mainline for uspace/lib/posix/include/posix/unistd.h
- Timestamp:
- 2018-09-25T18:33:23Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- dc68f72
- Parents:
- 5e6b76d
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-09-25 17:42:45)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-09-25 18:33:23)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/include/posix/unistd.h
r5e6b76d ref84413 81 81 extern ssize_t write(int fildes, const void *buf, size_t nbyte); 82 82 extern int fsync(int fildes); 83 extern int ftruncate(int fildes, off_t length);84 83 extern int rmdir(const char *path); 85 84 extern int unlink(const char *path); … … 89 88 #ifdef _LARGEFILE64_SOURCE 90 89 extern off64_t lseek64(int fildes, off64_t offset, int whence); 90 extern int ftruncate64(int fildes, off64_t length); 91 91 #endif 92 92 93 #if _FILE_OFFSET_BITS == 64 94 static inline off_t lseek(int fildes, off_t offset, int whence) 95 { 96 /* Declarations visible in this function body only. */ 97 typedef int64_t off64_t; 98 extern off64_t lseek64(int fildes, off64_t offset, int whence);99 100 /* With _FILE_OFFSET_BITS == 64, lseek is actually lseek64. */ 101 return lseek64(fildes, offset, whence); 102 } 93 #if _FILE_OFFSET_BITS == 64 && LONG_MAX == INT_MAX 94 #ifdef __GNUC__ 95 extern off_t lseek(int fildes, off_t offset, int whence) __asm__("lseek64"); 96 extern int ftruncate(int fildes, off_t length) __asm__("ftruncate64"); 97 #else 98 extern off_t lseek64(int fildes, off_t offset, int whence); 99 extern int ftruncate64(int fildes, off_t length); 100 #define lseek lseek64 101 #define ftruncate ftruncate64 102 #endif 103 103 #else 104 104 extern off_t lseek(int fildes, off_t offset, int whence); 105 extern int ftruncate(int fildes, off_t length); 105 106 #endif 106 107
Note:
See TracChangeset
for help on using the changeset viewer.