~vcs-imports/gawk/master

« back to all changes in this revision

Viewing changes to extension/time.c

Build and test dynamic extensions on VMS. Documented too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include <sys/types.h>
40
40
#include <sys/stat.h>
41
41
 
 
42
#ifdef __VMS
 
43
#define HAVE_NANOSLEEP
 
44
#define HAVE_GETTIMEOFDAY
 
45
#ifdef gettimeofday
 
46
#undef gettimeofday
 
47
#endif
 
48
#ifdef __ia64__
 
49
/* nanosleep not working on IA64 */
 
50
static int
 
51
vms_fake_nanosleep(const struct timespec *rqdly, struct timespec *rmdly)
 
52
{
 
53
        int result;
 
54
 
 
55
        result = sleep(rqdly->tv_sec);
 
56
        if (result == 0) {
 
57
                return 0;
 
58
        } else {
 
59
                return -1;
 
60
        }
 
61
}
 
62
#define nanosleep(x,y) vms_fake_nanosleep(x, y)
 
63
#endif
 
64
#endif
 
65
 
42
66
#include "gawkapi.h"
43
67
 
44
68
#include "gettext.h"