aboutsummaryrefslogtreecommitdiffstats
path: root/extension/time.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-01-10 12:30:37 +0200
committerArnold D. Robbins <arnold@skeeve.com>2014-01-10 12:30:37 +0200
commit1daf400c55ab311c43f1cfa0a253955d81c0c2e7 (patch)
tree8951b5772f56ee5086fce670261777356858b606 /extension/time.c
parent54684e9a410c64bcde42c39e02832d586ffd1074 (diff)
parent664868f72b741ba448398d609e18a4cbb1ca20be (diff)
downloadegawk-1daf400c55ab311c43f1cfa0a253955d81c0c2e7.tar.gz
egawk-1daf400c55ab311c43f1cfa0a253955d81c0c2e7.tar.bz2
egawk-1daf400c55ab311c43f1cfa0a253955d81c0c2e7.zip
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'extension/time.c')
-rw-r--r--extension/time.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/extension/time.c b/extension/time.c
index 9fadfe54..b1e9a40a 100644
--- a/extension/time.c
+++ b/extension/time.c
@@ -39,6 +39,30 @@
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef __VMS
+#define HAVE_NANOSLEEP
+#define HAVE_GETTIMEOFDAY
+#ifdef gettimeofday
+#undef gettimeofday
+#endif
+#ifdef __ia64__
+/* nanosleep not working on IA64 */
+static int
+vms_fake_nanosleep(const struct timespec *rqdly, struct timespec *rmdly)
+{
+ int result;
+
+ result = sleep(rqdly->tv_sec);
+ if (result == 0) {
+ return 0;
+ } else {
+ return -1;
+ }
+}
+#define nanosleep(x,y) vms_fake_nanosleep(x, y)
+#endif
+#endif
+
#include "gawkapi.h"
#include "gettext.h"