summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-10-31 18:20:21 +0000
committerEric Andersen <andersen@codepoet.org>2002-10-31 18:20:21 +0000
commit6737908f74ff566748864548cf35bb1da8e64af6 (patch)
tree6eeafda4548f49d960e1b597c880a810a08a66f0 /libc/sysdeps/linux/common
parentc734e7ca57f520e55236b21eaef16ac40099a378 (diff)
Ok, this commit is _huge_ and its gonna change the world. I've
been working on a new config system on and off for about 6 months now, but I've never been fully satisfied. Well, I'm finally am happy with the new config system, so here it is. This completely removes the old uClibc configuration system, and replaces it with an entirely new system based on LinuxKernelConf, from http://www.xs4all.nl/~zippel/lc/ As it turns out, Linus has just merged LinuxKernelConf into Linux 2.5.45, so it looks like I made the right choice. I have thus far updated only x86. I'll be updating the other architectures shortly. -Erik
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/Makefile4
-rw-r--r--libc/sysdeps/linux/common/bits/posix_opt.h4
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_stdio.h12
-rw-r--r--libc/sysdeps/linux/common/creat64.c4
-rw-r--r--libc/sysdeps/linux/common/ftruncate64.c4
-rw-r--r--libc/sysdeps/linux/common/getdirname.c4
-rw-r--r--libc/sysdeps/linux/common/getrlimit64.c2
-rw-r--r--libc/sysdeps/linux/common/initfini.c2
-rw-r--r--libc/sysdeps/linux/common/llseek.c2
-rw-r--r--libc/sysdeps/linux/common/mmap64.c4
-rw-r--r--libc/sysdeps/linux/common/open64.c4
-rw-r--r--libc/sysdeps/linux/common/pread_write.c20
-rw-r--r--libc/sysdeps/linux/common/setrlimit64.c2
-rw-r--r--libc/sysdeps/linux/common/syscalls.c24
-rw-r--r--libc/sysdeps/linux/common/truncate64.c4
15 files changed, 48 insertions, 48 deletions
diff --git a/libc/sysdeps/linux/common/Makefile b/libc/sysdeps/linux/common/Makefile
index 6e6f716a2..5139b52f5 100644
--- a/libc/sysdeps/linux/common/Makefile
+++ b/libc/sysdeps/linux/common/Makefile
@@ -25,7 +25,7 @@ TOPDIR=../../../../
include $(TOPDIR)Rules.mak
SAFECFLAGS=$(WARNINGS) $(OPTIMIZATION) -fno-builtin
-ifeq ($(strip $(DOPIC)),true)
+ifeq ($(strip $(DOPIC)),y)
SAFECFLAGS+=-fPIC
endif
@@ -35,7 +35,7 @@ CSRC= waitpid.c getdnnm.c gethstnm.c getcwd.c \
cmsg_nxthdr.c longjmp.c open64.c ftruncate64.c \
truncate64.c getrlimit64.c setrlimit64.c creat64.c mmap64.c \
llseek.c pread_write.c _exit.c setuid.c sync.c getdirname.c
-ifneq ($(strip $(EXCLUDE_BRK)),true)
+ifneq ($(strip $(EXCLUDE_BRK)),y)
CSRC+=sbrk.c
endif
COBJS=$(patsubst %.c,%.o, $(CSRC))
diff --git a/libc/sysdeps/linux/common/bits/posix_opt.h b/libc/sysdeps/linux/common/bits/posix_opt.h
index 4f7d78eb9..73fa007d2 100644
--- a/libc/sysdeps/linux/common/bits/posix_opt.h
+++ b/libc/sysdeps/linux/common/bits/posix_opt.h
@@ -130,14 +130,14 @@
#define _LFS_ASYNCHRONOUS_IO 1
/* The LFS support in asynchronous I/O is also available. */
-#ifdef __UCLIBC_HAVE_LFS__
+#ifdef __UCLIBC_HAS_LFS__
# define _LFS64_ASYNCHRONOUS_IO 1
#else
# undef _LFS64_ASYNCHRONOUS_IO
#endif
/* The rest of the LFS is also available. */
-#ifdef __UCLIBC_HAVE_LFS__
+#ifdef __UCLIBC_HAS_LFS__
# define _LFS_LARGEFILE 1
# define _LFS64_LARGEFILE 1
# define _LFS64_STDIO 1
diff --git a/libc/sysdeps/linux/common/bits/uClibc_stdio.h b/libc/sysdeps/linux/common/bits/uClibc_stdio.h
index 24f2ec39e..83c082f75 100644
--- a/libc/sysdeps/linux/common/bits/uClibc_stdio.h
+++ b/libc/sysdeps/linux/common/bits/uClibc_stdio.h
@@ -36,9 +36,9 @@
#define __STDIO_THREADSAFE
#endif
-#ifdef __UCLIBC_HAVE_LFS__
+#ifdef __UCLIBC_HAS_LFS__
#define __STDIO_LARGE_FILES
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */
#ifdef __UCLIBC_HAS_WCHAR__
#define __STDIO_WIDE
@@ -47,22 +47,22 @@
/* Make sure defines related to large files are consistent. */
#ifdef _LIBC
-#ifdef __UCLIBC_HAVE_LFS__
+#ifdef __UCLIBC_HAS_LFS__
#undef __USE_LARGEFILE
#undef __USE_LARGEFILE64
#undef __USE_FILE_OFFSET64
/* if we're actually building uClibc with large file support, only define... */
#define __USE_LARGEFILE64 1
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */
#else /* not _LIBC */
-#ifndef __UCLIBC_HAVE_LFS__
+#ifndef __UCLIBC_HAS_LFS__
#if defined(__LARGEFILE64_SOURCE) || defined(__USE_LARGEFILE64) \
|| defined(__USE_FILE_OFFSET64)
#error Sorry... uClibc was built without large file support!
#endif
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */
#endif /* _LIBC */
diff --git a/libc/sysdeps/linux/common/creat64.c b/libc/sysdeps/linux/common/creat64.c
index 28b897384..deeda3892 100644
--- a/libc/sysdeps/linux/common/creat64.c
+++ b/libc/sysdeps/linux/common/creat64.c
@@ -20,7 +20,7 @@
#include <fcntl.h>
#include <sys/types.h>
-#if defined __UCLIBC_HAVE_LFS__
+#if defined __UCLIBC_HAS_LFS__
#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64
#undef _FILE_OFFSET_BITS
@@ -42,5 +42,5 @@ int creat64 (const char *file, mode_t mode)
{
return open64 (file, O_WRONLY|O_CREAT|O_TRUNC, mode);
}
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */
diff --git a/libc/sysdeps/linux/common/ftruncate64.c b/libc/sysdeps/linux/common/ftruncate64.c
index fb95450c1..703ba490b 100644
--- a/libc/sysdeps/linux/common/ftruncate64.c
+++ b/libc/sysdeps/linux/common/ftruncate64.c
@@ -19,7 +19,7 @@
#include <stdint.h>
#include <sys/syscall.h>
-#if defined __UCLIBC_HAVE_LFS__ && defined __NR_ftruncate64
+#if defined __UCLIBC_HAS_LFS__ && defined __NR_ftruncate64
#ifndef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) __syscall_ftruncate64 (args)
#define __NR___syscall_ftruncate64 __NR_ftruncate64
@@ -41,4 +41,4 @@ int ftruncate64 (int fd, __off64_t length)
#else
#error Your machine is not 64 bit or 32 bit, I am dazed and confused.
#endif
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */
diff --git a/libc/sysdeps/linux/common/getdirname.c b/libc/sysdeps/linux/common/getdirname.c
index 6ea76cca9..4cc528fc7 100644
--- a/libc/sysdeps/linux/common/getdirname.c
+++ b/libc/sysdeps/linux/common/getdirname.c
@@ -31,7 +31,7 @@ char *
get_current_dir_name (void)
{
char *pwd;
-#if defined __UCLIBC_HAVE_LFS__
+#if defined __UCLIBC_HAS_LFS__
struct stat64 dotstat, pwdstat;
#else
struct stat dotstat, pwdstat;
@@ -39,7 +39,7 @@ get_current_dir_name (void)
pwd = getenv ("PWD");
if (pwd != NULL
-#if defined __UCLIBC_HAVE_LFS__
+#if defined __UCLIBC_HAS_LFS__
&& stat64 (".", &dotstat) == 0
&& stat64 (pwd, &pwdstat) == 0
#else
diff --git a/libc/sysdeps/linux/common/getrlimit64.c b/libc/sysdeps/linux/common/getrlimit64.c
index 2d423f5f3..1af7870af 100644
--- a/libc/sysdeps/linux/common/getrlimit64.c
+++ b/libc/sysdeps/linux/common/getrlimit64.c
@@ -34,7 +34,7 @@
#include <sys/types.h>
#include <sys/resource.h>
-#if defined __UCLIBC_HAVE_LFS__
+#if defined __UCLIBC_HAS_LFS__
/* Put the soft and hard limits for RESOURCE in *RLIMITS.
Returns 0 if successful, -1 if not (and sets errno). */
diff --git a/libc/sysdeps/linux/common/initfini.c b/libc/sysdeps/linux/common/initfini.c
index 4a6ebee75..4ff7c8218 100644
--- a/libc/sysdeps/linux/common/initfini.c
+++ b/libc/sysdeps/linux/common/initfini.c
@@ -46,7 +46,7 @@
/* Declare symbols as hidden. Hidden symbols are only seen by
* the link editor and not by the dynamic loader. */
-#ifdef HAVE_DOT_HIDDEN
+#ifdef __HAVE_DOT_HIDDEN__
# define HIDDEN(func) asm (".hidden " #func );
#else
# define HIDDEN(func)
diff --git a/libc/sysdeps/linux/common/llseek.c b/libc/sysdeps/linux/common/llseek.c
index 63534fa71..8683157b9 100644
--- a/libc/sysdeps/linux/common/llseek.c
+++ b/libc/sysdeps/linux/common/llseek.c
@@ -34,7 +34,7 @@
#include <sys/syscall.h>
-#if defined __NR__llseek && defined __UCLIBC_HAVE_LFS__
+#if defined __NR__llseek && defined __UCLIBC_HAS_LFS__
#ifndef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) __syscall_llseek (args)
diff --git a/libc/sysdeps/linux/common/mmap64.c b/libc/sysdeps/linux/common/mmap64.c
index 33a4f404a..73407c4cf 100644
--- a/libc/sysdeps/linux/common/mmap64.c
+++ b/libc/sysdeps/linux/common/mmap64.c
@@ -22,7 +22,7 @@
#include <sysdep.h>
#include <sys/mman.h>
-#if defined __UCLIBC_HAVE_LFS__
+#if defined __UCLIBC_HAS_LFS__
#if defined _FILE_OFFSET_BITS && _FILE_OFFSET_BITS != 64
#undef _FILE_OFFSET_BITS
@@ -48,5 +48,5 @@ __ptr_t mmap64(__ptr_t addr, size_t len, int prot, int flags, int fd, __off64_t
return mmap (addr, len, prot, flags, fd, (off_t) offset);
}
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */
diff --git a/libc/sysdeps/linux/common/open64.c b/libc/sysdeps/linux/common/open64.c
index 840ec6938..543aa138f 100644
--- a/libc/sysdeps/linux/common/open64.c
+++ b/libc/sysdeps/linux/common/open64.c
@@ -25,7 +25,7 @@
#define O_LARGEFILE 0100000
#endif
-#ifdef __UCLIBC_HAVE_LFS__
+#ifdef __UCLIBC_HAS_LFS__
extern int __libc_open (__const char *file, int oflag, mode_t mode);
/* Open FILE with access OFLAG. If OFLAG includes O_CREAT,
@@ -45,4 +45,4 @@ int __libc_open64 (const char *file, int oflag, ...)
return __libc_open(file, oflag | O_LARGEFILE, mode);
}
weak_alias (__libc_open64, open64);
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */
diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c
index 801359276..98a059416 100644
--- a/libc/sysdeps/linux/common/pread_write.c
+++ b/libc/sysdeps/linux/common/pread_write.c
@@ -53,14 +53,14 @@ ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
}
weak_alias (__libc_pread, pread)
-#if defined __UCLIBC_HAVE_LFS__
+#if defined __UCLIBC_HAS_LFS__
ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
{
return(__syscall_pread(fd, buf, count,
__LONG_LONG_PAIR((off_t)(offset>>32),(off_t)(offset&0xffffffff))));
}
weak_alias (__libc_pread64, pread64)
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */
#endif /* __NR_pread */
@@ -78,14 +78,14 @@ ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
}
weak_alias (__libc_pwrite, pwrite)
-#if defined __UCLIBC_HAVE_LFS__
+#if defined __UCLIBC_HAS_LFS__
ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
{
return(__syscall_pwrite(fd, buf, count,
__LONG_LONG_PAIR((off_t)(offset>>32),(off_t)(offset&0xffffffff))));
}
weak_alias (__libc_pwrite64, pwrite64)
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */
#endif /* __NR_pwrite */
@@ -128,7 +128,7 @@ static ssize_t __fake_pread_write(int fd, void *buf,
return(result);
}
-#if defined __UCLIBC_HAVE_LFS__
+#if defined __UCLIBC_HAS_LFS__
static ssize_t __fake_pread_write64(int fd, void *buf,
size_t count, off64_t offset, int do_pwrite)
{
@@ -163,7 +163,7 @@ static ssize_t __fake_pread_write64(int fd, void *buf,
__set_errno (save_errno);
return result;
}
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */
#endif /* ! defined __NR_pread || ! defined __NR_pwrite */
#ifndef __NR_pread
@@ -173,13 +173,13 @@ ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
}
weak_alias (__libc_pread, pread)
-#if defined __UCLIBC_HAVE_LFS__
+#if defined __UCLIBC_HAS_LFS__
ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
{
return(__fake_pread_write64(fd, buf, count, offset, 0));
}
weak_alias (__libc_pread64, pread64)
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */
#endif /* ! __NR_pread */
@@ -190,12 +190,12 @@ ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
}
weak_alias (__libc_pwrite, pwrite)
-#if defined __UCLIBC_HAVE_LFS__
+#if defined __UCLIBC_HAS_LFS__
ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
{
return(__fake_pread_write64(fd, (void*)buf, count, offset, 1));
}
weak_alias (__libc_pwrite64, pwrite64)
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */
#endif /* ! __NR_pwrite */
diff --git a/libc/sysdeps/linux/common/setrlimit64.c b/libc/sysdeps/linux/common/setrlimit64.c
index 29fad3e36..8d190f573 100644
--- a/libc/sysdeps/linux/common/setrlimit64.c
+++ b/libc/sysdeps/linux/common/setrlimit64.c
@@ -35,7 +35,7 @@
#include <sys/types.h>
#include <sys/resource.h>
-#if defined __UCLIBC_HAVE_LFS__
+#if defined __UCLIBC_HAS_LFS__
/* Set the soft and hard limits for RESOURCE to *RLIMITS.
Only the super-user can increase hard limits.
diff --git a/libc/sysdeps/linux/common/syscalls.c b/libc/sysdeps/linux/common/syscalls.c
index 0229880a6..e0dbdf39d 100644
--- a/libc/sysdeps/linux/common/syscalls.c
+++ b/libc/sysdeps/linux/common/syscalls.c
@@ -962,7 +962,7 @@ _syscall2(int, getitimer, __itimer_which_t, which, struct itimerval *, value);
#include <unistd.h>
#include <sys/stat.h>
_syscall2(int, stat, const char *, file_name, struct stat *, buf);
-#if ! defined __NR_stat64 && defined __UCLIBC_HAVE_LFS__
+#if ! defined __NR_stat64 && defined __UCLIBC_HAS_LFS__
weak_alias(stat, stat64);
#endif
#endif
@@ -972,7 +972,7 @@ weak_alias(stat, stat64);
#include <unistd.h>
#include <sys/stat.h>
_syscall2(int, lstat, const char *, file_name, struct stat *, buf);
-#if ! defined __NR_lstat64 && defined __UCLIBC_HAVE_LFS__
+#if ! defined __NR_lstat64 && defined __UCLIBC_HAS_LFS__
weak_alias(lstat, lstat64);
#endif
#endif
@@ -982,7 +982,7 @@ weak_alias(lstat, lstat64);
#include <unistd.h>
#include <sys/stat.h>
_syscall2(int, fstat, int, filedes, struct stat *, buf);
-#if ! defined __NR_fstat64 && defined __UCLIBC_HAVE_LFS__
+#if ! defined __NR_fstat64 && defined __UCLIBC_HAS_LFS__
weak_alias(fstat, fstat64);
#endif
#endif
@@ -1621,29 +1621,29 @@ int getrlimit (__rlimit_resource_t resource, struct rlimit *rlimits)
//#define __NR_stat64 195
#ifdef L_stat64
-#if defined __NR_stat64 && defined __UCLIBC_HAVE_LFS__
+#if defined __NR_stat64 && defined __UCLIBC_HAS_LFS__
#include <unistd.h>
#include <sys/stat.h>
_syscall2(int, stat64, const char *, file_name, struct stat64 *, buf);
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */
#endif
//#define __NR_lstat64 196
#ifdef L_lstat64
-#if defined __NR_lstat64 && defined __UCLIBC_HAVE_LFS__
+#if defined __NR_lstat64 && defined __UCLIBC_HAS_LFS__
#include <unistd.h>
#include <sys/stat.h>
_syscall2(int, lstat64, const char *, file_name, struct stat64 *, buf);
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */
#endif
//#define __NR_fstat64 197
#ifdef L_fstat64
-#if defined __NR_fstat64 && defined __UCLIBC_HAVE_LFS__
+#if defined __NR_fstat64 && defined __UCLIBC_HAS_LFS__
#include <unistd.h>
#include <sys/stat.h>
_syscall2(int, fstat64, int, filedes, struct stat64 *, buf);
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */
#endif
@@ -1679,16 +1679,16 @@ _syscall2(int, pivot_root, const char *, new_root, const char *, put_old)
//#define __NR_getdents64 220
#ifdef L_getdents64
-#ifdef __UCLIBC_HAVE_LFS__
+#ifdef __UCLIBC_HAS_LFS__
#include <unistd.h>
#include <dirent.h>
_syscall3(int, getdents64, int, fd, char *, dirp, size_t, count);
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */
#endif
//#define __NR_fcntl64 221
#ifdef L__fcntl64
-#ifdef __UCLIBC_HAVE_LFS__
+#ifdef __UCLIBC_HAS_LFS__
#ifdef __NR_fcntl64
#define __NR__fcntl64 __NR_fcntl64
#include <stdarg.h>
diff --git a/libc/sysdeps/linux/common/truncate64.c b/libc/sysdeps/linux/common/truncate64.c
index 3205f748d..fa5000107 100644
--- a/libc/sysdeps/linux/common/truncate64.c
+++ b/libc/sysdeps/linux/common/truncate64.c
@@ -19,7 +19,7 @@
#include <stdint.h>
#include <sys/syscall.h>
-#if defined __UCLIBC_HAVE_LFS__ && defined __NR_truncate64
+#if defined __UCLIBC_HAS_LFS__ && defined __NR_truncate64
#ifndef INLINE_SYSCALL
#define INLINE_SYSCALL(name, nr, args...) __syscall_truncate64 (args)
#define __NR___syscall_truncate64 __NR_truncate64
@@ -40,4 +40,4 @@ int truncate64 (const char * path, __off64_t length)
#else
#error Your machine is not 64 bit or 32 bit, I am dazed and confused.
#endif
-#endif /* __UCLIBC_HAVE_LFS__ */
+#endif /* __UCLIBC_HAS_LFS__ */