diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-08-08 10:45:30 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-08-08 10:45:30 +0100 |
commit | 168d8692c8d5e2530f2064fd137ee4c55e504591 (patch) | |
tree | 19a4698498f116df335debb0fa78436ffb3ee0b5 /extras | |
parent | 6c818dce46287023be51055e353b5fa3628ef926 (diff) | |
download | xen-168d8692c8d5e2530f2064fd137ee4c55e504591.tar.gz xen-168d8692c8d5e2530f2064fd137ee4c55e504591.tar.bz2 xen-168d8692c8d5e2530f2064fd137ee4c55e504591.zip |
stubdom: turn off_t 64bit on x86
We can decide to make off_t 64bit instead of implementing the LFS
tricks. Name corresponding functions foo64 to permit simple caml
programs linking.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'extras')
-rw-r--r-- | extras/mini-os/include/fcntl.h | 5 | ||||
-rw-r--r-- | extras/mini-os/include/posix/sys/mman.h | 2 | ||||
-rw-r--r-- | extras/mini-os/include/posix/sys/stat.h | 7 | ||||
-rw-r--r-- | extras/mini-os/lib/sys.c | 9 |
4 files changed, 11 insertions, 12 deletions
diff --git a/extras/mini-os/include/fcntl.h b/extras/mini-os/include/fcntl.h index 0615790e53..cc59b3caa9 100644 --- a/extras/mini-os/include/fcntl.h +++ b/extras/mini-os/include/fcntl.h @@ -91,8 +91,9 @@ struct flock64 { #define F_LINUX_SPECIFIC_BASE 1024 */ -int open(const char *path, int flags, ...); -int fcntl(int fd, int cmd, ...); #endif +int open(const char *path, int flags, ...) asm("open64"); +int fcntl(int fd, int cmd, ...); + #endif diff --git a/extras/mini-os/include/posix/sys/mman.h b/extras/mini-os/include/posix/sys/mman.h index 46def46141..cfd6586c7f 100644 --- a/extras/mini-os/include/posix/sys/mman.h +++ b/extras/mini-os/include/posix/sys/mman.h @@ -14,7 +14,7 @@ #define MAP_FAILED ((void*)0) -void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset); +void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset) asm("mmap64"); int munmap(void *start, size_t length); #define munlock(addr, len) ((void)addr, (void)len, 0) #define mlock(addr, len) ((void)addr, (void)len, 0) diff --git a/extras/mini-os/include/posix/sys/stat.h b/extras/mini-os/include/posix/sys/stat.h new file mode 100644 index 0000000000..0c13bea534 --- /dev/null +++ b/extras/mini-os/include/posix/sys/stat.h @@ -0,0 +1,7 @@ +#ifndef _POSIX_SYS_STAT_H +#define _POSIX_SYS_STAT_H + +#include_next <sys/stat.h> +int fstat(int fd, struct stat *buf) asm("fstat64"); + +#endif /* _POSIX_SYS_STAT_H */ diff --git a/extras/mini-os/lib/sys.c b/extras/mini-os/lib/sys.c index 457bde3c8d..7b6de7e6d7 100644 --- a/extras/mini-os/lib/sys.c +++ b/extras/mini-os/lib/sys.c @@ -204,9 +204,6 @@ int open(const char *pathname, int flags, ...) files[fd].file.offset = 0; return fd; } -#if defined(__x86_64__) || defined(__ia64__) -__typeof__(open) open64 __attribute__((__alias__("open"))); -#endif int isatty(int fd) { @@ -347,9 +344,6 @@ off_t lseek(int fd, off_t offset, int whence) } return files[fd].file.offset; } -#if defined(__x86_64__) || defined(__ia64__) -__typeof__(lseek) lseek64 __attribute__((__alias__("lseek"))); -#endif int fsync(int fd) { switch (files[fd].type) { @@ -1120,9 +1114,6 @@ void *mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset return map_frames_ex(&zero, n, 0, 0, 1, DOMID_SELF, 0, 0); } else ASSERT(0); } -#if defined(__x86_64__) || defined(__ia64__) -__typeof__(mmap) mmap64 __attribute__((__alias__("mmap"))); -#endif int munmap(void *start, size_t length) { |