summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-11-19 20:05:14 +0000
committerJakub Jelinek <jakub@redhat.com>2005-11-19 20:05:14 +0000
commit8e8c8d3c871666d3c4fb0cda0147fb2231beeb09 (patch)
tree8205dc9da58d4c3090372b155fdede74e7b3d6b1 /sysdeps/unix/sysv
parentb9616a4d2d0ff113b95a638127ad27c98e6c713b (diff)
Updated to fedora-glibc-20051119T1959
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/Makefile7
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/shm.h1
-rw-r--r--sysdeps/unix/sysv/linux/bits/shm.h1
-rw-r--r--sysdeps/unix/sysv/linux/futimesat.c17
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/shm.h1
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/shm.h7
-rw-r--r--sysdeps/unix/sysv/linux/kernel-features.h5
-rw-r--r--sysdeps/unix/sysv/linux/m68k/bits/mman.h3
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/shm.h5
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S8
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S12
-rw-r--r--sysdeps/unix/sysv/linux/s390/bits/shm.h1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/shm.h1
-rw-r--r--sysdeps/unix/sysv/linux/unlinkat.c7
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/bits/shm.h1
15 files changed, 62 insertions, 15 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index c5e1da03e9..b2bbbc0b28 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -152,6 +152,11 @@ CFLAGS-mq_receive.c += -fexceptions
endif
ifeq ($(subdir),nscd)
-CFLAGS-connections.c += -DHAVE_EPOLL
+CFLAGS-connections.c += -DHAVE_EPOLL -DHAVE_SENDFILE
+CFLAGS-pwdcache.c += -DHAVE_SENDFILE
+CFLAGS-grpcache.c += -DHAVE_SENDFILE
+CFLAGS-hstcache.c += -DHAVE_SENDFILE
+CFLAGS-aicache.c += -DHAVE_SENDFILE
+CFLAGS-initgrcache.c += -DHAVE_SENDFILE
CFLAGS-gai.c += -DNEED_NETLINK
endif
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
index bbee434ea0..35226c16ce 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
@@ -71,6 +71,7 @@ struct shmid_ds
# define SHM_DEST 01000 /* segment will be destroyed on last detach */
# define SHM_LOCKED 02000 /* segment will not be swapped */
# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
+# define SHM_NORESERVE 010000 /* don't check for reservations */
struct shminfo
{
diff --git a/sysdeps/unix/sysv/linux/bits/shm.h b/sysdeps/unix/sysv/linux/bits/shm.h
index 225b89db2d..318d601aed 100644
--- a/sysdeps/unix/sysv/linux/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/bits/shm.h
@@ -73,6 +73,7 @@ struct shmid_ds
# define SHM_DEST 01000 /* segment will be destroyed on last detach */
# define SHM_LOCKED 02000 /* segment will not be swapped */
# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
+# define SHM_NORESERVE 010000 /* don't check for reservations */
struct shminfo
{
diff --git a/sysdeps/unix/sysv/linux/futimesat.c b/sysdeps/unix/sysv/linux/futimesat.c
index 7ab0477c5e..8a87cc442b 100644
--- a/sysdeps/unix/sysv/linux/futimesat.c
+++ b/sysdeps/unix/sysv/linux/futimesat.c
@@ -37,7 +37,22 @@ futimesat (fd, file, tvp)
{
char *buf = NULL;
- if (fd != AT_FDCWD && file[0] != '/')
+ if (file == NULL)
+ {
+ static const char procfd[] = "/proc/self/fd/%d";
+ /* Buffer for the path name we are going to use. It consists of
+ - the string /proc/self/fd/
+ - the file descriptor number.
+ The final NUL is included in the sizeof. A bit of overhead
+ due to the format elements compensates for possible negative
+ numbers. */
+ size_t buflen = sizeof (procfd) + sizeof (int) * 3;
+ buf = alloca (buflen);
+
+ __snprintf (buf, buflen, procfd, fd);
+ file = buf;
+ }
+ else if (fd != AT_FDCWD && file[0] != '/')
{
size_t filelen = strlen (file);
static const char procfd[] = "/proc/self/fd/%d/%s";
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/shm.h b/sysdeps/unix/sysv/linux/hppa/bits/shm.h
index 1c022fda83..a91f1f575b 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/shm.h
@@ -79,6 +79,7 @@ struct shmid_ds
# define SHM_DEST 01000 /* segment will be destroyed on last detach */
# define SHM_LOCKED 02000 /* segment will not be swapped */
# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
+# define SHM_NORESERVE 010000 /* don't check for reservations */
struct shminfo
{
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/shm.h b/sysdeps/unix/sysv/linux/ia64/bits/shm.h
index 078345d7e6..7f38f2dd7b 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/shm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2002, 2005 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
@@ -38,6 +38,8 @@
/* Segment low boundary address multiple. */
#define SHMLBA (1024 * 1024)
+/* Type to count number of attaches. */
+typedef unsigned long int shmatt_t;
/* Data structure describing a set of semaphores. */
struct shmid_ds
@@ -49,7 +51,7 @@ struct shmid_ds
__time_t shm_ctime; /* time of last change by shmctl() */
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
- unsigned long int shm_nattch; /* number of current attaches */
+ shmatt_t shm_nattch; /* number of current attaches */
unsigned long int __unused1;
unsigned long int __unused2;
};
@@ -64,6 +66,7 @@ struct shmid_ds
# define SHM_DEST 01000 /* segment will be destroyed on last detach */
# define SHM_LOCKED 02000 /* segment will not be swapped */
# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
+# define SHM_NORESERVE 010000 /* don't check for reservations */
struct shminfo
{
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index 002cc46c79..44ac727820 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -84,6 +84,11 @@
# define __ASSUME_MSG_NOSIGNAL 1
#endif
+/* The sendfile syscall was introduced in 2.2.0. */
+#if __LINUX_KERNEL_VERSION >= 131584
+# define __ASSUME_SENDFILE 1
+#endif
+
/* On x86 another `getrlimit' syscall was added in 2.3.25. */
#if __LINUX_KERNEL_VERSION >= 131865 && defined __i386__
# define __ASSUME_NEW_GETRLIMIT_SYSCALL 1
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/mman.h b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
index 815a3da88f..6e7bdc99dd 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/mman.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX memory map interface. Linux/m68k version.
- Copyright (C) 1997, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2000, 2003, 2005 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
@@ -78,6 +78,7 @@
/* Flags for `mremap'. */
#ifdef __USE_GNU
# define MREMAP_MAYMOVE 1
+# define MREMAP_FIXED 2
#endif
/* Advice to `madvise'. */
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/shm.h b/sysdeps/unix/sysv/linux/powerpc/bits/shm.h
index 7705fb64d4..62560c0caf 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/shm.h
@@ -80,9 +80,10 @@ struct shmid_ds
# define SHM_INFO 14
/* shm_mode upper byte flags */
-# define SHM_DEST 01000 /* segment will be destroyed on last detach */
-# define SHM_LOCKED 02000 /* segment will not be swapped */
+# define SHM_DEST 01000 /* segment will be destroyed on last detach */
+# define SHM_LOCKED 02000 /* segment will not be swapped */
# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
+# define SHM_NORESERVE 010000 /* don't check for reservations */
struct shminfo
{
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S
index 72170c95c0..3e4a188a20 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S
@@ -44,7 +44,11 @@
#define stackblock 20
#ifndef __socket
-#define __socket P(__,socket)
+# ifndef NO_WEAK_ALIAS
+# define __socket P(__,socket)
+# else
+# define __socket socket
+# endif
#endif
.text
@@ -114,4 +118,6 @@ ENTRY(__socket)
PSEUDO_END (__socket)
+#ifndef NO_WEAK_ALIAS
weak_alias (__socket, socket)
+#endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S
index ec3ab5d9e6..a73f7be666 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S
@@ -41,12 +41,12 @@
#define stackblock 80 /* offset to socket parm area. */
-#ifndef socket
-/* If this is just socket.S leave it alone! */
-#else
#ifndef __socket
-#define __socket P(__,socket)
-#endif
+# ifndef NO_WEAK_ALIAS
+# define __socket P(__,socket)
+# else
+# define __socket socket
+# endif
#endif
.text
@@ -120,4 +120,6 @@ ENTRY(__socket)
cfi_endproc
PSEUDO_END (__socket)
+#ifndef NO_WEAK_ALIAS
weak_alias (__socket, socket)
+#endif
diff --git a/sysdeps/unix/sysv/linux/s390/bits/shm.h b/sysdeps/unix/sysv/linux/s390/bits/shm.h
index b7c2ad0514..d88ed36efa 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/shm.h
@@ -80,6 +80,7 @@ struct shmid_ds
# define SHM_DEST 01000 /* segment will be destroyed on last detach */
# define SHM_LOCKED 02000 /* segment will not be swapped */
# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
+# define SHM_NORESERVE 010000 /* don't check for reservations */
struct shminfo
{
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/shm.h b/sysdeps/unix/sysv/linux/sparc/bits/shm.h
index f075be8d8a..03decb110c 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/shm.h
@@ -81,6 +81,7 @@ struct shmid_ds
# define SHM_DEST 01000 /* segment will be destroyed on last detach */
# define SHM_LOCKED 02000 /* segment will not be swapped */
# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
+# define SHM_NORESERVE 010000 /* don't check for reservations */
struct shminfo
{
diff --git a/sysdeps/unix/sysv/linux/unlinkat.c b/sysdeps/unix/sysv/linux/unlinkat.c
index 36c0215b48..821029f5e5 100644
--- a/sysdeps/unix/sysv/linux/unlinkat.c
+++ b/sysdeps/unix/sysv/linux/unlinkat.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
+/* unlinkat -- Remove a link by relative name.
+ Copyright (C) 2005 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
@@ -20,7 +21,9 @@
#include <fcntl.h>
#include <stddef.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
+#include <sysdep.h>
#include <unistd.h>
@@ -51,7 +54,7 @@ unlinkat (fd, file, flag)
due to the format elements compensates for possible negative
numbers. */
size_t buflen = sizeof (procfd) + sizeof (int) * 3 + filelen;
- buf = alloca (buflen);
+ buf = __alloca (buflen);
__snprintf (buf, buflen, procfd, fd, file);
file = buf;
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/shm.h b/sysdeps/unix/sysv/linux/x86_64/bits/shm.h
index 4282d75617..3d8c05d212 100644
--- a/sysdeps/unix/sysv/linux/x86_64/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/x86_64/bits/shm.h
@@ -80,6 +80,7 @@ struct shmid_ds
# define SHM_DEST 01000 /* segment will be destroyed on last detach */
# define SHM_LOCKED 02000 /* segment will not be swapped */
# define SHM_HUGETLB 04000 /* segment is mapped via hugetlb */
+# define SHM_NORESERVE 010000 /* don't check for reservations */
struct shminfo
{