Author: ps-guest
Date: 2009-05-06 09:39:30 +0000 (Wed, 06 May 2009)
New Revision: 3460

Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff
Log:
* kfreebsd/local-sysdeps.diff: update to revision 2501 (from glibc-bsd).



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2009-05-05 14:41:43 UTC (rev 
3459)
+++ glibc-package/trunk/debian/changelog        2009-05-06 09:39:30 UTC (rev 
3460)
@@ -1,5 +1,8 @@
 eglibc (2.9-12) unstable; urgency=low
 
+  [ Petr Salinger ]
+  * kfreebsd/local-sysdeps.diff: update to revision 2501 (from glibc-bsd).
+
   * 
 
  -- Aurelien Jarno <[email protected]>  Tue, 05 May 2009 15:40:40 +0200

Modified: glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff
===================================================================
--- glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff      
2009-05-05 14:41:43 UTC (rev 3459)
+++ glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff      
2009-05-06 09:39:30 UTC (rev 3460)
@@ -3125,7 +3125,7 @@
 +
 --- /dev/null
 +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/fcntl.h
-@@ -0,0 +1,145 @@
+@@ -0,0 +1,151 @@
 +/* O_*, F_*, FD_* bit values for FreeBSD.
 +   Copyright (C) 1991-1992, 1997, 2002 Free Software Foundation, Inc.
 +   This file is part of the GNU C Library.
@@ -3146,52 +3146,56 @@
 +   02111-1307 USA.  */
 +
 +#ifndef       _FCNTL_H
-+#error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
++# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
 +#endif
 +
 +#include <sys/types.h>
++#include <bits/wordsize.h>
++#ifdef __USE_GNU
++# include <bits/uio.h>
++#endif
 +
-+/* File access modes for `open' and `fcntl'.  */
-+#define       O_RDONLY        0       /* Open read-only.  */
-+#define       O_WRONLY        1       /* Open write-only.  */
-+#define       O_RDWR          2       /* Open read/write.  */
 +
++/* open/fcntl - O_SYNC is only implemented on blocks devices and on files
++   located on an ext2 file system */
++#define O_ACCMODE        0003
++#define O_RDONLY           00
++#define O_WRONLY           01
++#define O_RDWR                     02
++#define O_CREAT                 01000 /* not fcntl */
++#define O_EXCL                  04000 /* not fcntl */
++#define O_NOCTTY      0100000 /* not fcntl */
++#define O_TRUNC                 02000 /* not fcntl */
++#define O_APPEND          010
++#define O_NONBLOCK         04
++#define O_NDELAY      O_NONBLOCK
++#define O_SYNC                   0200
++#define O_FSYNC                O_SYNC
++#define O_ASYNC                  0100
 +
-+/* Bits OR'd into the second argument to open.  */
-+#define       O_CREAT         0x0200  /* Create file if it doesn't exist.  */
-+#define       O_EXCL          0x0800  /* Fail if file already exists.  */
-+#define       O_TRUNC         0x0400  /* Truncate file to zero length.  */
-+#define       O_NOCTTY        0x8000  /* Don't assign a controlling terminal. 
 */
-+#ifdef        __USE_MISC
-+#define       O_ASYNC         0x0040  /* Send SIGIO to owner when data is 
ready.  */
-+#define       O_FSYNC         0x0080  /* Synchronous writes.  */
-+#define       O_SYNC          O_FSYNC
-+#define       O_SHLOCK        0x0010  /* Open with shared file lock.  */
-+#define       O_EXLOCK        0x0020  /* Open with shared exclusive lock.  */
-+#define O_NOFOLLOW    0x0100  /* Don't follow symlinks.  */
-+#define       O_DIRECT    0x00010000  /* Attempt to bypass buffer cache */
++#ifdef __USE_GNU
++# define O_DIRECT     0200000 /* Direct disk access.  */
++enum { O_DIRECTORY = 0 };     /* Must be a directory.  */
++enum { O_NOATIME = 0};          /* Do not set atime.  */
++# define O_NOFOLLOW      0400 /* Do not follow links.  */
 +#endif
 +
-+enum { O_DIRECTORY = 0 };
-+
-+/* File status flags for `open' and `fcntl'.  */
-+#define       O_APPEND        0x0008  /* Writes append to the file.  */
-+#define       O_NONBLOCK      0x0004  /* Non-blocking I/O.  */
-+
 +#ifdef __USE_BSD
-+#define       O_NDELAY        O_NONBLOCK
++#define O_SHLOCK          020 /* Open with shared file lock.  */
++#define O_EXLOCK          040 /* Open with shared exclusive lock.  */
 +#endif
 +
-+/* Since 'off_t' is 64-bit, O_LARGEFILE is a no-op.  */
-+#define O_LARGEFILE   0
-+
-+/* FreeBSD doesn't have smaller grained synchronicity control than per file.
-+   fdatasync() is equivalent to fsync(), so we define O_DSYNC == O_SYNC.  */
++/* For now FreeBSD has synchronisity options for data and read operations.
++   We define the symbols here but let them do the same as O_SYNC since
++   this is a superset.        */
 +#if defined __USE_POSIX199309 || defined __USE_UNIX98
 +# define O_DSYNC      O_SYNC  /* Synchronize data.  */
-+# define O_RSYNC      O_SYNC  /* Synchronize read operations.  */
++# define O_RSYNC      O_SYNC  /* Synchronize read operations.  */
 +#endif
 +
++/* Since 'off_t' is 64-bit, O_LARGEFILE is a no-op.  */
++#define O_LARGEFILE   0
++
 +#ifdef __USE_BSD
 +/* Bits in the file status flags returned by F_GETFL.
 +   These are all the O_* flags, plus FREAD and FWRITE, which are
@@ -3199,52 +3203,50 @@
 +   given to `open'.  */
 +#define FREAD         1
 +#define       FWRITE          2
-+
-+/* Traditional BSD names the O_* bits.  */
-+#define FASYNC                O_ASYNC
-+#define FCREAT                O_CREAT
-+#define FEXCL         O_EXCL
-+#define FTRUNC                O_TRUNC
-+#define FNOCTTY               O_NOCTTY
-+#define FFSYNC                O_FSYNC
-+#define FSYNC         O_SYNC
-+#define FAPPEND               O_APPEND
-+#define FNONBLOCK     O_NONBLOCK
-+#define FNDELAY               O_NDELAY
 +#endif
 +
-+/* Mask for file access modes.  This is system-dependent in case
-+   some system ever wants to define some other flavor of access.  */
-+#define       O_ACCMODE       (O_RDONLY|O_WRONLY|O_RDWR)
++/* Values for the second argument to `fcntl'.  */
++#define F_DUPFD               0       /* Duplicate file descriptor.  */
++#define F_GETFD               1       /* Get file descriptor flags.  */
++#define F_SETFD               2       /* Set file descriptor flags.  */
++#define F_GETFL               3       /* Get file status flags.  */
++#define F_SETFL               4       /* Set file status flags.  */
++#define F_GETLK               7       /* Get record locking info.  */
++#define F_SETLK               8       /* Set record locking info 
(non-blocking).  */
++#define F_SETLKW      9       /* Set record locking info (blocking).  */
++/* Not necessary, we always have 64-bit offsets.  */
++#define F_GETLK64     7       /* Get record locking info.  */
++#define F_SETLK64     8       /* Set record locking info (non-blocking).  */
++#define F_SETLKW64    9       /* Set record locking info (blocking).  */
 +
-+/* Values for the second argument to `fcntl'.  */
-+#define       F_DUPFD         0       /* Duplicate file descriptor.  */
-+#define       F_GETFD         1       /* Get file descriptor flags.  */
-+#define       F_SETFD         2       /* Set file descriptor flags.  */
-+#define       F_GETFL         3       /* Get file status flags.  */
-+#define       F_SETFL         4       /* Set file status flags.  */
-+#ifdef __USE_BSD
-+#define       F_GETOWN        5       /* Get owner (receiver of SIGIO).  */
-+#define       F_SETOWN        6       /* Set owner (receiver of SIGIO).  */
++#if defined __USE_BSD || defined __USE_UNIX98
++# define F_SETOWN     5       /* Get owner of socket (receiver of SIGIO).  */
++# define F_GETOWN     6       /* Set owner of socket (receiver of SIGIO).  */
 +#endif
-+#define       F_GETLK         7       /* Get record locking info.  */
-+#define       F_SETLK         8       /* Set record locking info 
(non-blocking).  */
-+#define       F_SETLKW        9       /* Set record locking info (blocking).  
*/
 +
-+/* File descriptor flags used with F_GETFD and F_SETFD.  */
-+#define       FD_CLOEXEC      1       /* Close on exec.  */
++/* For F_[GET|SET]FD.  */
++#define FD_CLOEXEC    1       /* actually anything with low bit set goes */
 +
++/* For posix fcntl() and `l_type' field of a `struct flock' for lockf().  */
++#define F_RDLCK               1       /* Read lock.  */
++#define F_WRLCK               3       /* Write lock.  */
++#define F_UNLCK               2       /* Remove lock.  */
 +
-+#include <bits/types.h>
++#ifdef __USE_BSD
++/* Operations for bsd flock(), also used by the kernel implementation.        
*/
++# define LOCK_SH      1       /* shared lock */
++# define LOCK_EX      2       /* exclusive lock */
++# define LOCK_NB      4       /* or'd with one of the above to prevent
++                                 blocking */
++# define LOCK_UN      8       /* remove lock */
++#endif
 +
-+/* The structure describing an advisory lock.  This is the type of the third
-+   argument to `fcntl' for the F_GETLK, F_SETLK, and F_SETLKW requests.  */
 +struct flock
 +  {
 +    __off_t l_start;  /* Offset where the lock begins.  */
 +    __off_t l_len;    /* Size of the locked area; zero means until EOF.  */
 +    __pid_t l_pid;    /* Process holding the lock.  */
-+    short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.  */
++    short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.  */
 +    short int l_whence;       /* Where `l_start' is relative to (like 
`lseek').  */
 +  };
 +
@@ -3254,23 +3256,27 @@
 +    __off64_t l_start;        /* Offset where the lock begins.  */
 +    __off64_t l_len;  /* Size of the locked area; zero means until EOF.  */
 +    __pid_t l_pid;    /* Process holding the lock.  */
-+    short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.  */
++    short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK.  */
 +    short int l_whence;       /* Where `l_start' is relative to (like 
`lseek').  */
 +  };
 +#endif
 +
-+/* Values for the `l_type' field of a `struct flock'.  */
-+#define       F_RDLCK 1       /* Read lock.  */
-+#define       F_WRLCK 3       /* Write lock.  */
-+#define       F_UNLCK 2       /* Remove lock.  */
++/* Define some more compatibility macros to be backward compatible with
++   BSD systems which did not managed to hide these kernel macros.  */
++#ifdef        __USE_BSD
++# define FAPPEND      O_APPEND
++# define FFSYNC               O_FSYNC
++# define FASYNC               O_ASYNC
++# define FNONBLOCK    O_NONBLOCK
++# define FNDELAY      O_NDELAY
 +
-+#ifdef __USE_BSD
-+/* Operations for flock().  */
-+# define LOCK_SH 1    /* shared lock */
-+# define LOCK_EX 2    /* exclusive lock */
-+# define LOCK_NB 4    /* or'd with one of the above to prevent blocking */
-+# define LOCK_UN 8    /* remove lock */
-+#endif
++#define FCREAT                O_CREAT
++#define FEXCL         O_EXCL
++#define FTRUNC                O_TRUNC
++#define FNOCTTY               O_NOCTTY
++#define FSYNC         O_SYNC
++#endif /* Use BSD.  */
++
 --- /dev/null
 +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/in.h
 @@ -0,0 +1,305 @@
@@ -6413,7 +6419,7 @@
 +#endif /* bits/typesizes.h */
 --- /dev/null
 +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/uio.h
-@@ -0,0 +1,49 @@
+@@ -0,0 +1,55 @@
 +/* Copyright (C) 1996-1997, 2002 Free Software Foundation, Inc.
 +   This file is part of the GNU C Library.
 +
@@ -6432,11 +6438,16 @@
 +   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
 +   02111-1307 USA.  */
 +
-+#ifndef _SYS_UIO_H
++#if !defined _SYS_UIO_H && !defined _FCNTL_H
 +# error "Never include <bits/uio.h> directly; use <sys/uio.h> instead."
 +#endif
 +
++#ifndef _BITS_UIO_H
++#define _BITS_UIO_H     1
 +
++#include <sys/types.h>
++
++
 +/* `struct iovec' -- Structure describing a section of memory.  */
 +
 +struct iovec
@@ -6463,6 +6474,7 @@
 +};
 +#endif
 +
++#endif
 --- /dev/null
 +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/utsname.h
 @@ -0,0 +1,27 @@
@@ -11993,7 +12005,7 @@
 +weak_alias (__vfork, vfork)
 --- /dev/null
 +++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/if_index.c
-@@ -0,0 +1,303 @@
+@@ -0,0 +1,311 @@
 +/* Copyright (C) 2002 Free Software Foundation, Inc.
 +   This file is part of the GNU C Library.
 +   Contributed by Bruno Haible <[email protected]>, 2002.
@@ -12071,7 +12083,15 @@
 +            if (index == 0)
 +              abort ();
 +
++            /* FIXME: 'struct if_msghdr' contains a 'struct if_data' which in 
turns
++               contains 'unsigned long' values. Their size therefore depends 
on
++               the running kernel (32 or 64 bits). This should be fixed in the
++               compat layer of the kernel. Meanwhile just workaround the bug 
here/ */
++#if 0
 +            sdl = (struct sockaddr_dl *) (msg + 1);
++#else
++            sdl = (struct sockaddr_dl *) (p + msg->ifm_msglen - sizeof(struct 
sockaddr_dl) - 2);
++#endif
 +            namelen = sdl->sdl_nlen;
 +            /* Avoid overflowing namebuf[].  */
 +            if (namelen > IFNAMSIZ)


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to