Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
trace.c: do not mark getnanotime() as "inline"
author
Ben Walton
<bdwalton@gmail.com>
Sun, 28 Sep 2014 07:50:26 +0000
(08:50 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 29 Sep 2014 23:13:58 +0000
(16:13 -0700)
Oracle Studio compilers don't allow for static variables in
functions that are defined to be inline. GNU C does permit this.
Let's reference the C99 standard though, which doesn't allow for
inline functions to contain modifiable static variables.
Signed-off-by: Ben Walton <bdwalton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
trace.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
62b553c
)
diff --git
a/trace.c
b/trace.c
index e583dc63bb8d7062f8b735e701978574e9fcbf25..03990df747ebf3be4c082c38f2a8bb03d31b945a 100644
(file)
--- a/
trace.c
+++ b/
trace.c
@@
-384,7
+384,7
@@
static inline uint64_t gettimeofday_nanos(void)
* Returns nanoseconds since the epoch (01/01/1970), for performance tracing
* (i.e. favoring high precision over wall clock time accuracy).
*/
-
inline
uint64_t getnanotime(void)
+uint64_t getnanotime(void)
{
static uint64_t offset;
if (offset > 1) {