projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.9.45: cleaner & thread-safe pv-table interning
[sbcl.git]
/
src
/
runtime
/
wrap.c
diff --git
a/src/runtime/wrap.c
b/src/runtime/wrap.c
index
153ebd5
..
376beaf
100644
(file)
--- a/
src/runtime/wrap.c
+++ b/
src/runtime/wrap.c
@@
-167,14
+167,26
@@
wrapped_readlink(char *path)
*
* Some motivated spark fixed MIPS. -- ths, 2005-10-06 */
*
* Some motivated spark fixed MIPS. -- ths, 2005-10-06 */
-#ifdef LISP_FEATURE_MIPS
+#if defined(LISP_FEATURE_LARGEFILE) && !defined(LISP_FEATURE_MIPS)
+typedef dev_t ffi_dev_t;
+typedef off_t ffi_off_t;
+#elif defined(LISP_FEATURE_MIPS)
typedef unsigned long ffi_dev_t; /* Linux/MIPS struct stat doesn't use dev_t */
typedef off_t ffi_off_t;
typedef unsigned long ffi_dev_t; /* Linux/MIPS struct stat doesn't use dev_t */
typedef off_t ffi_off_t;
+#elif defined(LISP_FEATURE_DARWIN)
+typedef dev_t ffi_dev_t;
+typedef off_t ffi_off_t;
#else
typedef u32 ffi_dev_t; /* since Linux dev_t can be 64 bits */
typedef u32 ffi_off_t; /* since OpenBSD 2.8 st_size is 64 bits */
#endif
#else
typedef u32 ffi_dev_t; /* since Linux dev_t can be 64 bits */
typedef u32 ffi_off_t; /* since OpenBSD 2.8 st_size is 64 bits */
#endif
+#ifdef LISP_FEATURE_OS_PROVIDES_BLKSIZE_T
+typedef blksize_t ffi_blksize_t;
+#else
+typedef unsigned long ffi_blksize_t;
+#endif
+
/* a representation of stat(2) results which doesn't depend on CPU or OS */
struct stat_wrapper {
/* KLUDGE: The verbose wrapped_st_ prefixes are to protect us from
/* a representation of stat(2) results which doesn't depend on CPU or OS */
struct stat_wrapper {
/* KLUDGE: The verbose wrapped_st_ prefixes are to protect us from
@@
-201,7
+213,7
@@
struct stat_wrapper {
#endif
ffi_dev_t wrapped_st_rdev; /* device type (if inode device) */
ffi_off_t wrapped_st_size; /* total size, in bytes */
#endif
ffi_dev_t wrapped_st_rdev; /* device type (if inode device) */
ffi_off_t wrapped_st_size; /* total size, in bytes */
- unsigned long wrapped_st_blksize; /* blocksize for filesystem I/O */
+ ffi_blksize_t wrapped_st_blksize; /* blocksize for filesystem I/O */
unsigned long wrapped_st_blocks; /* number of blocks allocated */
time_t wrapped_st_atime; /* time_t of last access */
time_t wrapped_st_mtime; /* time_t of last modification */
unsigned long wrapped_st_blocks; /* number of blocks allocated */
time_t wrapped_st_atime; /* time_t of last access */
time_t wrapped_st_mtime; /* time_t of last modification */
@@
-452,9
+464,9
@@
int wifstopped(int status) {
int wstopsig(int status) {
return WSTOPSIG(status);
}
int wstopsig(int status) {
return WSTOPSIG(status);
}
-
/* FIXME: POSIX also defines WIFCONTINUED, but that appears not to
exist on at least Linux... */
/* FIXME: POSIX also defines WIFCONTINUED, but that appears not to
exist on at least Linux... */
+#endif /* !LISP_FEATURE_WIN32 */
/* From SB-POSIX, stat-macros */
int s_isreg(mode_t mode)
/* From SB-POSIX, stat-macros */
int s_isreg(mode_t mode)
@@
-477,6
+489,7
@@
int s_isfifo(mode_t mode)
{
return S_ISFIFO(mode);
}
{
return S_ISFIFO(mode);
}
+#ifndef LISP_FEATURE_WIN32
int s_islnk(mode_t mode)
{
#ifdef S_ISLNK
int s_islnk(mode_t mode)
{
#ifdef S_ISLNK