diff options
author | Jim Meyering <jim@meyering.net> | 2003-03-08 14:26:48 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-03-08 14:26:48 +0000 |
commit | eff5758aaf9e5c5269aa7c21f80925e680204be1 (patch) | |
tree | 75278878732a0f2e4e00019e367a1e0d2530e393 /lib | |
parent | ec655b669fc97bf37f0556e86930d96b6174a89f (diff) | |
download | coreutils-eff5758aaf9e5c5269aa7c21f80925e680204be1.tar.xz |
Don't use `defined' in a #define directive.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/xnanosleep.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/xnanosleep.c b/lib/xnanosleep.c index ca8727bd0..195f5499d 100644 --- a/lib/xnanosleep.c +++ b/lib/xnanosleep.c @@ -1,5 +1,5 @@ /* xnanosleep.c -- a more convenient interface to nanosleep - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -28,7 +28,12 @@ #include <sys/types.h> #include <time.h> -#define USE_CLOCK_GETTIME (defined CLOCK_REALTIME && HAVE_CLOCK_GETTIME) +#if HAVE_CLOCK_GETTIME && defined CLOCK_REALTIME +# define USE_CLOCK_GETTIME 1 +#else +# define USE_CLOCK_GETTIME 0 +#endif + #if ! USE_CLOCK_GETTIME # include <sys/time.h> #endif |