File: time

package info (click to toggle)
libnginx-mod-js 0.8.9-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,808 kB
  • sloc: ansic: 114,096; perl: 8,447; javascript: 2,520; exp: 487; sh: 322; xml: 312; python: 181; makefile: 18
file content (70 lines) | stat: -rw-r--r-- 1,497 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

# Copyright (C) Igor Sysoev
# Copyright (C) NGINX, Inc.


njs_feature="clock_gettime(CLOCK_MONOTONIC)"
njs_feature_name=NJS_HAVE_CLOCK_MONOTONIC
njs_feature_run=yes
njs_feature_incs=
njs_feature_libs=
njs_feature_test="#include <time.h>

                  int main() {
                      struct timespec  ts;

                      if (clock_gettime(CLOCK_MONOTONIC, &ts) == -1)
                          return 1;
                      return 0;
                  }"
. auto/feature


if [ $njs_found = no ]; then

    # Linux and Solaris 10 clock_gettime() are in librt.

    njs_feature="clock_gettime(CLOCK_MONOTONIC) in librt"
    njs_feature_libs="-lrt"
    . auto/feature

    if [ $njs_found = yes ]; then
		NJS_LIBRT="-lrt"
    fi
fi


# Linux, FreeBSD, MacOSX.

njs_feature="struct tm.tm_gmtoff"
njs_feature_name=NJS_HAVE_TM_GMTOFF
njs_feature_run=no
njs_feature_incs=
njs_feature_libs=
njs_feature_test="#include <time.h>

                  int main(void) {
                      time_t     t;
                      struct tm  tm;

                      t = 0;
                      localtime_r(&t, &tm);
                      return tm.tm_gmtoff;
                  }"
. auto/feature


# Solaris

njs_feature="altzone"
njs_feature_name=NJS_HAVE_ALTZONE
njs_feature_run=no
njs_feature_incs=
njs_feature_libs=
njs_feature_test="#include <time.h>

                  int main(void) {
                      altzone = 0;
                      return 0;
                  }"
. auto/feature