[Glibc-bsd-commits] r2907 - in trunk/glibc-ports/kfreebsd: . bits

Petr Salinger ps-guest at alioth.debian.org
Mon Jan 4 12:13:54 UTC 2010


Author: ps-guest
Date: 2010-01-04 12:13:50 +0000 (Mon, 04 Jan 2010)
New Revision: 2907

Removed:
   trunk/glibc-ports/kfreebsd/statconv.c
Modified:
   trunk/glibc-ports/kfreebsd/Dist
   trunk/glibc-ports/kfreebsd/bits/stat.h
   trunk/glibc-ports/kfreebsd/stat16conv.c
Log:
use mode_t/nlink_t in struct stat



Modified: trunk/glibc-ports/kfreebsd/Dist
===================================================================
--- trunk/glibc-ports/kfreebsd/Dist	2010-01-04 10:32:20 UTC (rev 2906)
+++ trunk/glibc-ports/kfreebsd/Dist	2010-01-04 12:13:50 UTC (rev 2907)
@@ -11,7 +11,6 @@
 regdef.h
 sa_len.c
 stat16conv.c
-statconv.c
 statfsconv.c
 sys/acl.h
 sys/extattr.h

Modified: trunk/glibc-ports/kfreebsd/bits/stat.h
===================================================================
--- trunk/glibc-ports/kfreebsd/bits/stat.h	2010-01-04 10:32:20 UTC (rev 2906)
+++ trunk/glibc-ports/kfreebsd/bits/stat.h	2010-01-04 12:13:50 UTC (rev 2907)
@@ -43,8 +43,10 @@
     __ino64_t st_ino;		/* File serial number.	*/
 #endif
 
-    __uint32_t st_mode;		/* File mode.  */
-    __uint32_t st_nlink;	/* Link count.  */
+    __mode_t st_mode;		/* File mode.  */
+    __mode_t __pad_mode;	/* __mode_t is 16 bit, fill to 32 bit to retain previous ABI */
+    __nlink_t st_nlink;		/* Link count.  */
+    __nlink_t __pad_nlink;	/* __nlink_t is 16 bit, fill to 32 bit to retain previous ABI */
 
     __uid_t st_uid;		/* User ID of the file's owner.  */
     __gid_t st_gid;		/* Group ID of the file's group.  */
@@ -93,8 +95,10 @@
     __dev_t st_dev;		/* Device containing the file.  */
     __ino64_t st_ino;		/* File serial number.	*/
 
-    __uint32_t st_mode;		/* File mode.  */
-    __uint32_t st_nlink;	/* Link count.  */
+    __mode_t st_mode;		/* File mode.  */
+    __mode_t __pad_mode;	/* __mode_t is 16 bit, fill to 32 bit to retain previous ABI */
+    __nlink_t st_nlink;		/* Link count.  */
+    __nlink_t __pad_nlink;	/* __nlink_t is 16 bit, fill to 32 bit to retain previous ABI */
 
     __uid_t st_uid;		/* User ID of the file's owner.  */
     __gid_t st_gid;		/* Group ID of the file's group.  */

Modified: trunk/glibc-ports/kfreebsd/stat16conv.c
===================================================================
--- trunk/glibc-ports/kfreebsd/stat16conv.c	2010-01-04 10:32:20 UTC (rev 2906)
+++ trunk/glibc-ports/kfreebsd/stat16conv.c	2010-01-04 12:13:50 UTC (rev 2907)
@@ -38,7 +38,9 @@
   q->st_dev = p16->st_dev;
   q->st_ino = p16->st_ino;
   q->st_mode = p16->st_mode;
+  q->__pad_mode = 0;
   q->st_nlink = p16->st_nlink;
+  q->__pad_nlink = 0;
   q->st_uid = p16->st_uid;
   q->st_gid = p16->st_gid;
   q->st_rdev = p16->st_rdev;
@@ -62,7 +64,9 @@
   q->st_dev = p16->st_dev;
   q->st_ino = p16->st_ino;
   q->st_mode = p16->st_mode;
+  q->__pad_mode = 0;
   q->st_nlink = p16->st_nlink;
+  q->__pad_nlink = 0;
   q->st_uid = p16->st_uid;
   q->st_gid = p16->st_gid;
   q->st_rdev = p16->st_rdev;

Deleted: trunk/glibc-ports/kfreebsd/statconv.c
===================================================================
--- trunk/glibc-ports/kfreebsd/statconv.c	2010-01-04 10:32:20 UTC (rev 2906)
+++ trunk/glibc-ports/kfreebsd/statconv.c	2010-01-04 12:13:50 UTC (rev 2907)
@@ -1,46 +0,0 @@
-/* Convert between different 'struct stat' formats.
-   Copyright (C) 2002 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Bruno Haible <bruno at clisp.org>, 2002.
-
-   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.  */
-
-#include <string.h>
-
-/* Convert a 'struct stat' to 'struct stat64'.  */
-static inline void
-stat_to_stat64 (const struct stat *p32, struct stat64 *p64)
-{
-  p64->st_dev = p32->st_dev;
-  p64->st_ino = p32->st_ino;
-  p64->st_mode = p32->st_mode;
-  p64->st_nlink = p32->st_nlink;
-  p64->st_uid = p32->st_uid;
-  p64->st_gid = p32->st_gid;
-  p64->st_rdev = p32->st_rdev;
-  p64->st_atime = p32->st_atime;
-  p64->st_atimensec = p32->st_atimensec;
-  p64->st_mtime = p32->st_mtime;
-  p64->st_mtimensec = p32->st_mtimensec;
-  p64->st_ctime = p32->st_ctime;
-  p64->st_ctimensec = p32->st_ctimensec;
-  p64->st_size = p32->st_size;
-  p64->st_blocks = p32->st_blocks;
-  p64->st_blksize = p32->st_blksize;
-  p64->st_flags = p32->st_flags;
-  p64->st_gen = p32->st_gen;
-  memcpy (p64->__unused1, p32->__unused1, sizeof (p32->__unused1));
-}




More information about the Glibc-bsd-commits mailing list