Changeset ef84413 in mainline for uspace/lib/posix/include
- Timestamp:
- 2018-09-25T18:33:23Z (7 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)
- Location:
- uspace/lib/posix/include/posix
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/include/posix/stdio.h
r5e6b76d ref84413 61 61 FILE *__restrict__ stream); 62 62 63 #ifdef _LARGEFILE64_SOURCE 64 extern int fseeko64(FILE *stream, off64_t offset, int whence); 65 extern off64_t ftello64(FILE *stream); 66 #endif 67 68 #if _FILE_OFFSET_BITS == 64 && LONG_MAX == INT_MAX 69 #ifdef __GNUC__ 70 extern int fseeko(FILE *stream, off_t offset, int whence) __asm__("fseeko64"); 71 extern off_t ftello(FILE *stream) __asm__("ftello64"); 72 #else 73 extern int fseeko64(FILE *stream, off_t offset, int whence); 74 extern off_t ftello64(FILE *stream); 75 #define fseeko fseeko64 76 #define ftello ftello64 77 #endif 78 #else 63 79 extern int fseeko(FILE *stream, off_t offset, int whence); 64 80 extern off_t ftello(FILE *stream); 81 #endif 65 82 66 83 /* Formatted Output */ -
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.