about summary refs log tree commit diff
path: root/bits
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /bits
parent7d58530341304d403a6626d7f7a1913165fe2f32 (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.xz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip
2.5-18.1
Diffstat (limited to 'bits')
-rw-r--r--bits/byteswap.h23
-rw-r--r--bits/link.h5
-rw-r--r--bits/linkmap.h4
-rw-r--r--bits/mman.h8
-rw-r--r--bits/resource.h10
-rw-r--r--bits/siginfo.h2
-rw-r--r--bits/syslog-path.h29
-rw-r--r--bits/types.h11
8 files changed, 70 insertions, 22 deletions
diff --git a/bits/byteswap.h b/bits/byteswap.h
index 38d8540130..949ed0bc9d 100644
--- a/bits/byteswap.h
+++ b/bits/byteswap.h
@@ -1,5 +1,5 @@
 /* Macros to swap the order of bytes in integer values.
-   Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1997,1998,2000,2001,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
@@ -25,32 +25,35 @@
 #define _BITS_BYTESWAP_H 1
 
 /* Swap bytes in 16 bit value.  */
+#define __bswap_constant_16(x) \
+     ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))
+
 #ifdef __GNUC__
 # define __bswap_16(x) \
     (__extension__							      \
-     ({ unsigned short int __bsx = (x);					      \
-        ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); }))
+     ({ unsigned short int __bsx = (x); __bswap_constant_16 (__bsx); }))
 #else
 static __inline unsigned short int
 __bswap_16 (unsigned short int __bsx)
 {
-  return ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8));
+  return __bswap_constant_16 (__bsx);
 }
 #endif
 
 /* Swap bytes in 32 bit value.  */
+#define __bswap_constant_32(x) \
+     ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >>  8) |	      \
+      (((x) & 0x0000ff00u) <<  8) | (((x) & 0x000000ffu) << 24))
+
 #ifdef __GNUC__
 # define __bswap_32(x) \
-    (__extension__							      \
-     ({ unsigned int __bsx = (x);					      \
-        ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >>  8) |    \
-	 (((__bsx) & 0x0000ff00) <<  8) | (((__bsx) & 0x000000ff) << 24)); }))
+  (__extension__							      \
+   ({ register unsigned int __bsx = (x); __bswap_constant_32 (__bsx); }))
 #else
 static __inline unsigned int
 __bswap_32 (unsigned int __bsx)
 {
-  return ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >>  8) |
-	  (((__bsx) & 0x0000ff00) <<  8) | (((__bsx) & 0x000000ff) << 24));
+  return __bswap_constant_32 (__bsx);
 }
 #endif
 
diff --git a/bits/link.h b/bits/link.h
index 470b4d3e5f..6b4f811c25 100644
--- a/bits/link.h
+++ b/bits/link.h
@@ -1,4 +1 @@
-struct link_map_machine
-  {
-    /* empty by default */
-  };
+#error "Architecture-specific definition needed."
diff --git a/bits/linkmap.h b/bits/linkmap.h
new file mode 100644
index 0000000000..470b4d3e5f
--- /dev/null
+++ b/bits/linkmap.h
@@ -0,0 +1,4 @@
+struct link_map_machine
+  {
+    /* empty by default */
+  };
diff --git a/bits/mman.h b/bits/mman.h
index a2ee064cae..0c15902706 100644
--- a/bits/mman.h
+++ b/bits/mman.h
@@ -1,5 +1,5 @@
 /* Definitions for BSD-style memory management.
-   Copyright (C) 1994-1998,2000,01,02 Free Software Foundation, Inc.
+   Copyright (C) 1994-1998,2000,01,02,05 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
@@ -85,6 +85,12 @@
 #define MS_SYNC		0		/* Synchronous memory sync.  */
 #define MS_INVALIDATE	2		/* Invalidate the caches.  */
 
+/* Flags for `mremap'.  */
+#ifdef __USE_GNU
+# define MREMAP_MAYMOVE	1		/* Mapping address may change.  */
+# define MREMAP_FIXED	2		/* Fifth argument sets new address.  */
+#endif
+
 /* Flags for `mlockall' (can be OR'd together).  */
 #define MCL_CURRENT	1		/* Lock all currently mapped pages.  */
 #define MCL_FUTURE	2		/* Lock all additions to address
diff --git a/bits/resource.h b/bits/resource.h
index 05b28dfccd..8057f5cc65 100644
--- a/bits/resource.h
+++ b/bits/resource.h
@@ -1,5 +1,5 @@
 /* Bit values & structures for resource limits.  4.4 BSD/generic GNU version.
-   Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1994,1996,1997,1998,2006 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
@@ -63,6 +63,14 @@ enum __rlimit_resource
     RLIMIT_NOFILE = RLIMIT_OFILE, /* Another name for the same thing.  */
 #define	RLIMIT_OFILE	RLIMIT_OFILE
 #define	RLIMIT_NOFILE	RLIMIT_NOFILE
+    /* Maximum size of all socket buffers.  */
+    RLIMIT_SBSIZE,
+#define RLIMIT_SBSIZE	RLIMIT_SBSIZE
+    /* Maximum size in bytes of the process address space.  */
+    RLIMIT_AS,
+    RLIMIT_VMEM = RLIMIT_AS,	/* Another name for the same thing.  */
+#define RLIMIT_AS	RLIMIT_AS
+#define RLIMIT_VMEM	RLIMIT_AS
 
     RLIMIT_NLIMITS,		/* Number of limit flavors.  */
     RLIM_NLIMITS = RLIMIT_NLIMITS /* Traditional name for same.  */
diff --git a/bits/siginfo.h b/bits/siginfo.h
index fe7b3b5f9c..241033b7cd 100644
--- a/bits/siginfo.h
+++ b/bits/siginfo.h
@@ -76,7 +76,7 @@ enum
 {
   ILL_ILLOPC = 1,		/* Illegal opcode.  */
 # define ILL_ILLOPC	ILL_ILLOPC
-  ILL_ILL_OPN,			/* Illegal operand.  */
+  ILL_ILLOPN,			/* Illegal operand.  */
 # define ILL_ILLOPN	ILL_ILLOPN
   ILL_ILLADR,			/* Illegal addressing mode.  */
 # define ILL_ILLADR	ILL_ILLADR
diff --git a/bits/syslog-path.h b/bits/syslog-path.h
new file mode 100644
index 0000000000..a1bbd6b216
--- /dev/null
+++ b/bits/syslog-path.h
@@ -0,0 +1,29 @@
+/* <bits/syslog-path.h> -- _PATH_LOG definition
+   Copyright (C) 2006 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#ifndef _SYS_SYSLOG_H
+# error "Never include this file directly.  Use <sys/syslog.h> instead"
+#endif
+
+#ifndef _BITS_SYSLOG_PATH_H
+#define _BITS_SYSLOG_PATH_H 1
+
+#define	_PATH_LOG	"/dev/log"
+
+#endif /* bits/syslog-path.h */
diff --git a/bits/types.h b/bits/types.h
index ce48964f14..65c8a9fe90 100644
--- a/bits/types.h
+++ b/bits/types.h
@@ -1,5 +1,5 @@
 /* bits/types.h -- definitions of __*_t types underlying *_t types.
-   Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2004, 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
@@ -114,6 +114,9 @@ typedef struct
 # define __ULONG32_TYPE		unsigned long int
 # define __S64_TYPE		__quad_t
 # define __U64_TYPE		__u_quad_t
+/* We want __extension__ before typedef's that use nonstandard base types
+   such as `long long' in C89 mode.  */
+# define __STD_TYPE		__extension__ typedef
 #elif __WORDSIZE == 64
 # define __SQUAD_TYPE		long int
 # define __UQUAD_TYPE		unsigned long int
@@ -123,15 +126,13 @@ typedef struct
 # define __ULONG32_TYPE		unsigned int
 # define __S64_TYPE		long int
 # define __U64_TYPE		unsigned long int
+/* No need to mark the typedef with __extension__.   */
+# define __STD_TYPE		typedef
 #else
 # error
 #endif
 #include <bits/typesizes.h>	/* Defines __*_T_TYPE macros.  */
 
-/* We want __extension__ before typedef's that use nonstandard base types
-   such as `long long' in C89 mode.  */
-#define __STD_TYPE __extension__ typedef
-
 
 __STD_TYPE __DEV_T_TYPE __dev_t;	/* Type of device numbers.  */
 __STD_TYPE __UID_T_TYPE __uid_t;	/* Type of user identifications.  */