[Glibc-bsd-commits] r3206 - in trunk/glibc-ports/kfreebsd: bits linuxthreads/bits

Robert Millan rmh at alioth.debian.org
Tue Dec 14 13:16:39 UTC 2010


Author: rmh
Date: 2010-12-14 13:16:16 +0000 (Tue, 14 Dec 2010)
New Revision: 3206

Modified:
   trunk/glibc-ports/kfreebsd/bits/stat16.h
   trunk/glibc-ports/kfreebsd/bits/typesizes.h
   trunk/glibc-ports/kfreebsd/linuxthreads/bits/typesizes.h
Log:
Fix sizeof(time_t)==sizeof(long) assumptions.

Modified: trunk/glibc-ports/kfreebsd/bits/stat16.h
===================================================================
--- trunk/glibc-ports/kfreebsd/bits/stat16.h	2010-12-13 20:13:00 UTC (rev 3205)
+++ trunk/glibc-ports/kfreebsd/bits/stat16.h	2010-12-14 13:16:16 UTC (rev 3206)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2006, 2010 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
@@ -48,9 +48,9 @@
 
     __uint32_t __unused1;
 
-    long int st_birthtime;	/* Time of file creation.  */
+    __time_t st_birthtime;	/* Time of file creation.  */
     long int st_birthtimensec;	/* Nanoseconds of file creation.  */
 
-#define _BIRTH_PADSIZE     (2*(8 - sizeof (long)))
+#define _BIRTH_PADSIZE     (16 - sizeof(__time_t) - sizeof (long int))
     char __birth_padding[_BIRTH_PADSIZE];
   };

Modified: trunk/glibc-ports/kfreebsd/bits/typesizes.h
===================================================================
--- trunk/glibc-ports/kfreebsd/bits/typesizes.h	2010-12-13 20:13:00 UTC (rev 3205)
+++ trunk/glibc-ports/kfreebsd/bits/typesizes.h	2010-12-14 13:16:16 UTC (rev 3206)
@@ -1,5 +1,5 @@
 /* bits/typesizes.h -- underlying types for *_t.  kFreeBSD version.
-   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2010 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
@@ -47,7 +47,14 @@
 #define	__FSFILCNT64_T_TYPE	__UQUAD_TYPE
 #define	__ID_T_TYPE		__U32_TYPE
 #define __CLOCK_T_TYPE		__S32_TYPE
-#define __TIME_T_TYPE		__SLONGWORD_TYPE
+
+/* Match the typedefs in sys/${arch}/include/_types.h */
+#if defined(__i386__) || defined(__powerpc__)
+#define __TIME_T_TYPE		__S32_TYPE
+#else
+#define __TIME_T_TYPE		__S64_TYPE
+#endif
+
 #define __USECONDS_T_TYPE	__U32_TYPE
 #define __SUSECONDS_T_TYPE	__SLONGWORD_TYPE
 #define __DADDR_T_TYPE		__SQUAD_TYPE

Modified: trunk/glibc-ports/kfreebsd/linuxthreads/bits/typesizes.h
===================================================================
--- trunk/glibc-ports/kfreebsd/linuxthreads/bits/typesizes.h	2010-12-13 20:13:00 UTC (rev 3205)
+++ trunk/glibc-ports/kfreebsd/linuxthreads/bits/typesizes.h	2010-12-14 13:16:16 UTC (rev 3206)
@@ -1,5 +1,5 @@
 /* bits/typesizes.h -- underlying types for *_t.  kFreeBSD version.
-   Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2010 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
@@ -47,7 +47,14 @@
 #define	__FSFILCNT64_T_TYPE	__UQUAD_TYPE
 #define	__ID_T_TYPE		__U32_TYPE
 #define __CLOCK_T_TYPE		__S32_TYPE
-#define __TIME_T_TYPE		__SLONGWORD_TYPE
+
+/* Match the typedefs in sys/${arch}/include/_types.h */
+#if defined(__i386__) || defined(__powerpc__)
+#define __TIME_T_TYPE		__S32_TYPE
+#else
+#define __TIME_T_TYPE		__S64_TYPE
+#endif
+
 #define __USECONDS_T_TYPE	__U32_TYPE
 #define __SUSECONDS_T_TYPE	__SLONGWORD_TYPE
 #define __DADDR_T_TYPE		__SQUAD_TYPE




More information about the Glibc-bsd-commits mailing list