diff options
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/_G_config.h | 9 | ||||
-rw-r--r-- | sysdeps/generic/bits/confname.h | 30 | ||||
-rw-r--r-- | sysdeps/generic/bits/resource.h | 26 | ||||
-rw-r--r-- | sysdeps/generic/bits/statfs.h | 10 | ||||
-rw-r--r-- | sysdeps/generic/bits/types.h | 17 | ||||
-rw-r--r-- | sysdeps/generic/memcmp.c | 2 | ||||
-rw-r--r-- | sysdeps/generic/memset.c | 3 | ||||
-rw-r--r-- | sysdeps/generic/strchr.c | 5 | ||||
-rw-r--r-- | sysdeps/generic/strlen.c | 7 | ||||
-rw-r--r-- | sysdeps/generic/sys/mman.h | 10 |
10 files changed, 98 insertions, 21 deletions
diff --git a/sysdeps/generic/_G_config.h b/sysdeps/generic/_G_config.h index 84a552b41e..a9a182169b 100644 --- a/sysdeps/generic/_G_config.h +++ b/sysdeps/generic/_G_config.h @@ -15,16 +15,19 @@ hold any value corresponding to members of the extended character set, as well as at least one value that does not correspond to any member of the extended character set. */ -#define _WINT_T +# define _WINT_T typedef unsigned int wint_t; #endif #define _G_size_t size_t #define _G_fpos_t __off_t +#define _G_fpos64_t __off_t #define _G_ssize_t __ssize_t #define _G_off_t __off_t +#define _G_off64_t __off_t #define _G_pid_t __pid_t #define _G_uid_t __uid_t #define _G_wint_t wint_t +#define _G_stat64 stat typedef int _G_int16_t __attribute__ ((__mode__ (__HI__))); typedef int _G_int32_t __attribute__ ((__mode__ (__SI__))); @@ -57,9 +60,9 @@ typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__))); #if defined (__cplusplus) || defined (__STDC__) -#define _G_ARGS(ARGLIST) ARGLIST +# define _G_ARGS(ARGLIST) ARGLIST #else -#define _G_ARGS(ARGLIST) () +# define _G_ARGS(ARGLIST) () #endif #endif /* _G_config.h */ diff --git a/sysdeps/generic/bits/confname.h b/sysdeps/generic/bits/confname.h index 5b5cf742b6..6926cad0ad 100644 --- a/sysdeps/generic/bits/confname.h +++ b/sysdeps/generic/bits/confname.h @@ -1,5 +1,5 @@ /* `sysconf', `pathconf', and `confstr' NAME values. Generic version. - Copyright (C) 1993, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1993, 1995, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -97,7 +97,7 @@ enum _SC_SHARED_MEMORY_OBJECTS, #define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS _SC_AIO_LISTIO_MAX, -#define _SC_AIO_LIST_MAX _SC_AIO_LIST_MAX +#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX _SC_AIO_MAX, #define _SC_AIO_MAX _SC_AIO_MAX _SC_AIO_PRIO_DELTA_MAX, @@ -316,10 +316,32 @@ enum #define _SC_NL_TEXTMAX _SC_NL_TEXTMAX }; -#ifdef __USE_POSIX2 +#if (defined __USE_POSIX2 || defined __USE_FILE_OFFSET64 \ + || defined __USE_LARGEFILE64 || defined __USE_LARGEFILE) /* Values for the NAME argument to `confstr'. */ enum { - _CS_PATH /* The default search path. */ + _CS_PATH, /* The default search path. */ +#define _CS_PATH _CS_PATH + +#if (defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \ + || defined __USE_LARGEFILE) + _CS_LFS_CFLAGS = 1000, +# define _CS_LFS_CFLAGS _CS_LFS_CFLAGS + _CS_LFS_LDFLAGS, +# define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS + _CS_LFS_LIBS, +# define _CS_LFS_LIBS _CS_LFS_LIBS + _CS_LFS_LINTFLAGS, +# define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS + _CS_LFS64_CFLAGS, +# define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS + _CS_LFS64_LDFLAGS, +# define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS + _CS_LFS64_LIBS, +# define _CS_LFS64_LIBS _CS_LFS64_LIBS + _CS_LFS64_LINTFLAGS +# define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS +#endif }; #endif diff --git a/sysdeps/generic/bits/resource.h b/sysdeps/generic/bits/resource.h index 2c35c12a47..46cf9a7af5 100644 --- a/sysdeps/generic/bits/resource.h +++ b/sysdeps/generic/bits/resource.h @@ -1,5 +1,5 @@ /* Bit values & structures for resource limits. 4.4 BSD/generic GNU version. - Copyright (C) 1994, 1996 Free Software Foundation, Inc. + Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -65,14 +65,34 @@ enum __rlimit_resource #define RLIM_INFINITY RLIM_INFINITY }; +/* Type for resource quantity measurement. */ +#ifndef __USE_FILE_OFFSET64 +typedef __rlim_t rlim_t; +#else +typedef __rlim64_t rlim_t; +#endif +#ifdef __USE_LARGEFILE64 +typedef __rlim64_t rlim64_t; +#endif + struct rlimit { /* The current (soft) limit. */ - int rlim_cur; + rlim_t rlim_cur; /* The hard limit. */ - int rlim_max; + rlim_t rlim_max; }; +#ifdef __USE_LARGEFILE64 +struct rlimit64 + { + /* The current (soft) limit. */ + rlim64_t rlim_cur; + /* The hard limit. */ + rlim64_t rlim_max; + }; +#endif + /* Whose usage statistics do you want? */ enum __rusage_who /* The macro definitions are necessary because some programs want diff --git a/sysdeps/generic/bits/statfs.h b/sysdeps/generic/bits/statfs.h index 10bc0728b2..9fa3388801 100644 --- a/sysdeps/generic/bits/statfs.h +++ b/sysdeps/generic/bits/statfs.h @@ -38,11 +38,11 @@ struct statfs { unsigned int f_type; unsigned int f_bsize; - unsigned int f_blocks; - unsigned int f_bfree; - unsigned int f_bavail; - unsigned int f_files; - unsigned int f_ffree; + __fsblkcnt_t f_blocks; + __fsblkcnt_t f_bfree; + __fsblkcnt_t f_bavail; + __fsblkcnt_t f_files; + __fsblkcnt_t f_ffree; __fsid_t f_fsid; unsigned int f_namelen; unsigned int f_spare[6]; diff --git a/sysdeps/generic/bits/types.h b/sysdeps/generic/bits/types.h index c264adc917..fdb36f0b54 100644 --- a/sysdeps/generic/bits/types.h +++ b/sysdeps/generic/bits/types.h @@ -65,6 +65,8 @@ typedef int __pid_t; /* Type of process identifications. */ typedef int __ssize_t; /* Type of a byte count, or error. */ typedef __u_quad_t __fsid_t; /* Type of file system IDs. */ typedef long int __clock_t; /* Type of CPU usage counts. */ +typedef long int __rlim_t; /* Type for resource measurement. */ +typedef __quad_t __rlim64_t; /* Type for resource measurement (LFS). */ /* Everythin' else. */ typedef long int __daddr_t; /* The type of a disk address. */ @@ -91,4 +93,19 @@ typedef struct typedef unsigned long int __fd_mask; + +/* Types from the Large File Support interface. */ + +/* Type to count number os disk blocks. */ +typedef long int __blkcnt_t; +typedef __quad_t __blkcnt64_t; + +/* Type to count file system blocks. */ +typedef unsigned int __fsblkcnt_t; +typedef __u_quad_t __fsblkcnt64_t; + +/* Type to count file system inodes. */ +typedef unsigned long int __fsfilcnt_t; +typedef __u_quad_t __fsfilcnt64_t; + #endif /* bits/types.h */ diff --git a/sysdeps/generic/memcmp.c b/sysdeps/generic/memcmp.c index 8fa371192c..844cdc6afb 100644 --- a/sysdeps/generic/memcmp.c +++ b/sysdeps/generic/memcmp.c @@ -132,6 +132,7 @@ memcmp_common_alignment (srcp1, srcp2, len) switch (len % 4) { + default: /* Avoid warning about uninitialized local variables. */ case 2: a0 = ((op_t *) srcp1)[0]; b0 = ((op_t *) srcp2)[0]; @@ -233,6 +234,7 @@ memcmp_not_common_alignment (srcp1, srcp2, len) switch (len % 4) { + default: /* Avoid warning about uninitialized local variables. */ case 2: a1 = ((op_t *) srcp1)[0]; a2 = ((op_t *) srcp1)[1]; diff --git a/sysdeps/generic/memset.c b/sysdeps/generic/memset.c index 1369698652..239dc21e3c 100644 --- a/sysdeps/generic/memset.c +++ b/sysdeps/generic/memset.c @@ -38,7 +38,8 @@ memset (dstpp, c, len) cccc |= cccc << 8; cccc |= cccc << 16; if (OPSIZ > 4) - cccc |= cccc << 32; + /* Do the shift in two steps to avoid warning if long has 32 bits. */ + cccc |= (cccc << 16) << 16; /* There are at least some bytes to set. No need to test for LEN == 0 in this alignment loop. */ diff --git a/sysdeps/generic/strchr.c b/sysdeps/generic/strchr.c index 3663382556..7c1eb9578a 100644 --- a/sysdeps/generic/strchr.c +++ b/sysdeps/generic/strchr.c @@ -63,7 +63,7 @@ strchr (s, c) switch (sizeof (longword)) { case 4: magic_bits = 0x7efefeffL; break; - case 8: magic_bits = (0x7efefefeL << 32) | 0xfefefeffL; break; + case 8: magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; break; default: abort (); } @@ -72,7 +72,8 @@ strchr (s, c) charmask = c | (c << 8); charmask |= charmask << 16; if (sizeof (longword) > 4) - charmask |= charmask << 32; + /* Do the shift in two steps to avoid a warning if long has 32 bits. */ + charmask |= (charmask << 16) << 16; if (sizeof (longword) > 8) abort (); diff --git a/sysdeps/generic/strlen.c b/sysdeps/generic/strlen.c index 1fb8b1c97c..b031df8103 100644 --- a/sysdeps/generic/strlen.c +++ b/sysdeps/generic/strlen.c @@ -60,9 +60,10 @@ strlen (str) if (sizeof (longword) > 4) { /* 64-bit version of the magic. */ - magic_bits = (0x7efefefeL << 32) | 0xfefefeffL; - himagic = (himagic << 32) | himagic; - lomagic = (lomagic << 32) | lomagic; + /* Do the shift in two steps to avoid a warning if long has 32 bits. */ + magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL; + himagic = ((himagic << 16) << 16) | himagic; + lomagic = ((lomagic << 16) << 16) | lomagic; } if (sizeof (longword) > 8) abort (); diff --git a/sysdeps/generic/sys/mman.h b/sysdeps/generic/sys/mman.h index 6484e028c9..6e41a923d5 100644 --- a/sysdeps/generic/sys/mman.h +++ b/sysdeps/generic/sys/mman.h @@ -91,8 +91,18 @@ __BEGIN_DECLS extern __caddr_t __mmap __P ((__caddr_t __addr, size_t __len, int __prot, int __flags, int __fd, __off_t __offset)); +#ifndef __USE_FILE_OFFSET64 extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, int __flags, int __fd, __off_t __offset)); +#else +extern __caddr_t mmap __P ((__caddr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off_t __offset)) + __asm__ ("mmap64"); +#endif +#ifdef __USE_LARGEFILE64 +extern __caddr_t mmap64 __P ((__caddr_t __addr, size_t __len, int __prot, + int __flags, int __fd, __off64_t __offset)); +#endif /* Deallocate any mapping for the region starting at ADDR and extending LEN bytes. Returns 0 if successful, -1 for errors (and sets errno). */ |