Lines 98-104
Link Here
|
98 |
#endif |
98 |
#endif |
99 |
|
99 |
|
100 |
#ifdef LINUX |
100 |
#ifdef LINUX |
|
|
101 |
#ifndef __USE_GNU |
101 |
#define __USE_GNU |
102 |
#define __USE_GNU |
|
|
103 |
#endif |
102 |
#if GLIBC >= 2 |
104 |
#if GLIBC >= 2 |
103 |
# include <shadow.h> |
105 |
# include <shadow.h> |
104 |
# include <asm/sigcontext.h> |
106 |
# include <asm/sigcontext.h> |
Lines 248-254
Link Here
|
248 |
# define NO_PTHREAD_PRIORITY |
250 |
# define NO_PTHREAD_PRIORITY |
249 |
extern int pthread_cancel(pthread_t); |
251 |
extern int pthread_cancel(pthread_t); |
250 |
extern unsigned int nanosleep(unsigned int); |
252 |
extern unsigned int nanosleep(unsigned int); |
251 |
# define SLEEP_TIMESPEC(timespec) (timespec##.tv_sec > 0) ? sleep(timespec##.tv_sec), nanosleep(timespec##.tv_nsec) : nanosleep(timespec##.tv_nsec) |
253 |
# define SLEEP_TIMESPEC(timespec) (timespec.tv_sec > 0) ? sleep(timespec.tv_sec), nanosleep(timespec.tv_nsec) : nanosleep(timespec.tv_nsec) |
252 |
# define PATH_MAX _POSIX_PATH_MAX |
254 |
# define PATH_MAX _POSIX_PATH_MAX |
253 |
# define S_ISSOCK S_ISFIFO |
255 |
# define S_ISSOCK S_ISFIFO |
254 |
# define PTHREAD_SIGACTION pthread_sigaction |
256 |
# define PTHREAD_SIGACTION pthread_sigaction |
Lines 438-451
Link Here
|
438 |
|
440 |
|
439 |
#ifndef NORMALIZE_TIMESPEC |
441 |
#ifndef NORMALIZE_TIMESPEC |
440 |
# define NORMALIZE_TIMESPEC(timespec) \ |
442 |
# define NORMALIZE_TIMESPEC(timespec) \ |
441 |
timespec##.tv_sec += timespec##.tv_nsec / 1000000000; \ |
443 |
timespec.tv_sec += timespec.tv_nsec / 1000000000; \ |
442 |
timespec##.tv_nsec %= 1000000000; |
444 |
timespec.tv_nsec %= 1000000000; |
443 |
#endif |
445 |
#endif |
444 |
|
446 |
|
445 |
#ifndef SET_TIMESPEC |
447 |
#ifndef SET_TIMESPEC |
446 |
# define SET_TIMESPEC(timespec, sec, nsec) \ |
448 |
# define SET_TIMESPEC(timespec, sec, nsec) \ |
447 |
timespec##.tv_sec = (sec); \ |
449 |
timespec.tv_sec = (sec); \ |
448 |
timespec##.tv_nsec = (nsec); \ |
450 |
timespec.tv_nsec = (nsec); \ |
449 |
NORMALIZE_TIMESPEC(timespec); |
451 |
NORMALIZE_TIMESPEC(timespec); |
450 |
#endif |
452 |
#endif |
451 |
|
453 |
|