This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch hjl/pr17711 created. glibc-2.20-482-g8bd82cf


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, hjl/pr17711 has been created
        at  8bd82cff9f6d7a71f1f26f7968309f87c530f55d (commit)

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=8bd82cff9f6d7a71f1f26f7968309f87c530f55d

commit 8bd82cff9f6d7a71f1f26f7968309f87c530f55d
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Fri Dec 19 06:30:31 2014 -0800

    Compile vismain with -fPIC and link with -pie

diff --git a/elf/Makefile b/elf/Makefile
index 11d6865..5582514 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -130,7 +130,7 @@ endif
 tests += $(tests-static)
 ifeq (yes,$(build-shared))
 tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
-	 constload1 order vismain noload filter unload \
+	 constload1 order noload filter unload \
 	 reldep reldep2 reldep3 reldep4 nodelete nodelete2 \
 	 nodlopen nodlopen2 neededtest neededtest2 \
 	 neededtest3 neededtest4 unload2 lateglobal initfirst global \
@@ -218,6 +218,9 @@ ifeq (yesyes,$(have-fpie)$(build-shared))
 modules-names += tst-piemod1
 tests += tst-pie1 tst-pie2
 tests-pie += tst-pie1 tst-pie2
+tests += vismain
+tests-pie += vismain
+CFLAGS-vismain.c = $(pic-ccflag)
 endif
 modules-execstack-yes = tst-execstack-mod
 extra-test-objs += $(addsuffix .os,$(strip $(modules-names)))

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=ef3088c8da5288533cd9197e928b33bdc8833718

commit ef3088c8da5288533cd9197e928b33bdc8833718
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Jan 5 11:47:31 2015 -0800

    Define CLOCKS_PER_SEC type to the type clock_t
    
    C99 specifies that CLOCKS_PER_SEC is an expression with the type clock_t.
    This patch adds a generic <bits/time2.h> to define CLOCKS_PER_SEC and
    provides the Linux/x86-64 version of <bits/time2.h> to support x32.
    
    	[BZ #17797]
    	* bits/time.h (CLOCKS_PER_SEC): Changed to ((clock_t) 1000000).
    	* sysdeps/unix/sysv/linux/bits/time.h (CLOCKS_PER_SEC): Likewise.
    	* sysdeps/unix/sysv/linux/clock.c: Include <assert.h>.
    	(clock): Assert CLOCKS_PER_SEC == 1000000l.
    	* time/clocktest.c (main): Replace %ld with %jd and cast to
    	intmax_t.

diff --git a/ChangeLog b/ChangeLog
index 262e300..7d34cc6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2015-01-05  H.J. Lu  <hongjiu.lu@intel.com>
+
+	[BZ #17797]
+	* bits/time.h (CLOCKS_PER_SEC): Changed to ((clock_t) 1000000).
+	* sysdeps/unix/sysv/linux/bits/time.h (CLOCKS_PER_SEC): Likewise.
+	* sysdeps/unix/sysv/linux/clock.c: Include <assert.h>.
+	(clock): Assert CLOCKS_PER_SEC == 1000000l.
+	* time/clocktest.c (main): Replace %ld with %jd and cast to
+	intmax_t.
+
 2015-01-05  Roland McGrath  <roland@hack.frob.com>
 
 	* sysdeps/generic/unwind-resume.h: New file.
diff --git a/NEWS b/NEWS
index 63918df..49c0a2d 100644
--- a/NEWS
+++ b/NEWS
@@ -16,7 +16,7 @@ Version 2.21
   17583, 17584, 17585, 17589, 17594, 17601, 17608, 17616, 17625, 17630,
   17633, 17634, 17635, 17647, 17653, 17657, 17664, 17665, 17668, 17682,
   17717, 17719, 17722, 17723, 17724, 17725, 17732, 17733, 17744, 17745,
-  17746, 17747, 17775, 17777, 17780, 17781, 17782, 17793, 17796
+  17746, 17747, 17775, 17777, 17780, 17781, 17782, 17793, 17796, 17797
 
 * i386 memcpy functions optimized with SSE2 unaligned load/store.
 
diff --git a/bits/time.h b/bits/time.h
index ae17b7f..7585ddf 100644
--- a/bits/time.h
+++ b/bits/time.h
@@ -24,13 +24,13 @@
 # ifndef _BITS_TIME_H
 #  define _BITS_TIME_H	1
 
-/* ISO/IEC 9899:1990 7.12.1: <time.h>
-   The macro `CLOCKS_PER_SEC' is the number per second of the value
-   returned by the `clock' function. */
+/* ISO/IEC 9899:1999 7.23.1: Components of time
+   The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is
+   the number per second of the value returned by the `clock' function.  */
 /* CAE XSH, Issue 4, Version 2: <time.h>
    The value of CLOCKS_PER_SEC is required to be 1 million on all
    XSI-conformant systems. */
-#  define CLOCKS_PER_SEC  1000000l
+#  define CLOCKS_PER_SEC  ((clock_t) 1000000)
 
 #  if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K
 /* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
diff --git a/sysdeps/unix/sysv/linux/bits/time.h b/sysdeps/unix/sysv/linux/bits/time.h
index 226d6dd..706946c 100644
--- a/sysdeps/unix/sysv/linux/bits/time.h
+++ b/sysdeps/unix/sysv/linux/bits/time.h
@@ -39,13 +39,13 @@ struct timeval
 # ifndef _BITS_TIME_H
 #  define _BITS_TIME_H	1
 
-/* ISO/IEC 9899:1990 7.12.1: <time.h>
-   The macro `CLOCKS_PER_SEC' is the number per second of the value
-   returned by the `clock' function. */
+/* ISO/IEC 9899:1999 7.23.1: Components of time
+   The macro `CLOCKS_PER_SEC' is an expression with type `clock_t' that is
+   the number per second of the value returned by the `clock' function.  */
 /* CAE XSH, Issue 4, Version 2: <time.h>
    The value of CLOCKS_PER_SEC is required to be 1 million on all
    XSI-conformant systems. */
-#  define CLOCKS_PER_SEC  1000000l
+#  define CLOCKS_PER_SEC  ((clock_t) 1000000)
 
 #  if (!defined __STRICT_ANSI__ || defined __USE_POSIX) \
    && !defined __USE_XOPEN2K
diff --git a/sysdeps/unix/sysv/linux/clock.c b/sysdeps/unix/sysv/linux/clock.c
index e06c4b3..b76ad77 100644
--- a/sysdeps/unix/sysv/linux/clock.c
+++ b/sysdeps/unix/sysv/linux/clock.c
@@ -19,16 +19,15 @@
 #include <sys/times.h>
 #include <time.h>
 #include <unistd.h>
-
-#if CLOCKS_PER_SEC != 1000000l
-# error "CLOCKS_PER_SEC should be 1000000"
-#endif
+#include <assert.h>
 
 clock_t
 clock (void)
 {
   struct timespec ts;
 
+  assert (CLOCKS_PER_SEC == 1000000l);
+
   /* clock_gettime shouldn't fail here since CLOCK_PROCESS_CPUTIME_ID is
      supported since 2.6.12.  Check the return value anyway in case the kernel
      barfs on us for some reason.  */
diff --git a/time/clocktest.c b/time/clocktest.c
index 2e6457d..13b7420 100644
--- a/time/clocktest.c
+++ b/time/clocktest.c
@@ -30,7 +30,7 @@ main (int argc, char ** argv)
 
   printf ("%jd clock ticks per second (start=%jd,stop=%jd)\n",
 	  (intmax_t) (stop - start), (intmax_t) start, (intmax_t) stop);
-  printf ("CLOCKS_PER_SEC=%ld, sysconf(_SC_CLK_TCK)=%ld\n",
-	  CLOCKS_PER_SEC, sysconf(_SC_CLK_TCK));
+  printf ("CLOCKS_PER_SEC=%jd, sysconf(_SC_CLK_TCK)=%ld\n",
+	  (intmax_t) CLOCKS_PER_SEC, sysconf(_SC_CLK_TCK));
   return 0;
 }

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]